Repository navigation
Add zlib-wasm workload - #43
Conversation
As a replacement for the asm.js zlib workload in Octane that we removed. Based on public domain zpipe.c example from https://www.zlib.net/zlib_how.html. Compresses about 60KB of Wasm binary, and decompresses again. Built with Emscripten, using zlib Emscripten port. A single iteration takes around 50ms, the total line item around 2s.
|
In #37 (comment) we discussed adding a compression/LZ77-style replacement workload, now that we removed the asm.js Octane zlib workload. Since there is a zlib port for Emscripten, this is actually quite straightforward, so what do you think of this workload? @kmiller68 @eqrion @jandem |
eqrion
left a comment
There was a problem hiding this comment.
This LGTM. Clever to re-use the wasm binary as the file to compress.
|
@kmiller68 Rebased and ready to be merged from my side. |
kmiller68
left a comment
There was a problem hiding this comment.
I think you're missing some fcloses, but maybe there's some magic that does it for you? Also, do you know how much time we spend in the fopen emscripten glue? It'd be nice to make sure we don't repeat the async-fs test where all the time is in Math.random.
According to a profile I just took (d8 on x64), we spend ~95.5% of the CPU cycles in Wasm code, ~3% compiling and in the GC, and just <1.5% in JS code, so the Emscripten glue code looks fine to me. |

As a replacement for the asm.js zlib workload in Octane that we removed.
Based on public domain zpipe.c example from https://www.zlib.net/zlib_how.html.
Compresses a ~60KB Wasm binary, and decompresses it again.
Built with Emscripten, using zlib Emscripten port.
A single iteration takes around 50ms, the total line item around 2s.