Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

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....



I 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.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: