3 ms·
In the comparison with Emscripten using wasm-decompile [1], the author appears to have forgotten to turn on optimization. Yes, if you run emcc with no -O optio
by comex 1y ago
In the comparison with Emscripten using wasm-decompile [1], the author appears to have forgotten to turn on optimization. Yes, if you run emcc with no -O option then you will get extremely bad generated code quality, similar to most C compilers. Add -O and you get nice and tight code similar to what c4wa outputs.
[1] https://github.com/kign/c4wa/blob/master/etc/doc/comparison.md https://github.com/kign/c4wa/blob/master/etc/doc/comparison....
- soegaard 1y agoI think, the author's goal was to produce wasm-code that had the same structure as the original C. Thus it makes sense to turn off the advanced optimizations.