shinh / elvm

EsoLangVM Compiler Infrastructure
MIT License
1.13k stars 143 forks source link

Add asm.js target #43

Closed minoki closed 7 years ago

minoki commented 7 years ago

For practical use of 8cc.js on the browser, it is necessary to improve its performance by making use of the modern technology like asm.js. Therefore I'm adding an asm.js target.

The output of asm.js backend should be compatible with the classic js target, and existing code (e.g. 8cc.js.html) need no changes.

On my laptop, the running time of 8cc.js is reduced from several tens of seconds to within a few second by using asm.js backend.

shinh commented 7 years ago

This is actually great! The asmjs version is ~20x faster for 8cc.js on my desktop. I've already updated http://shinh.skr.jp/elvm/8cc.js.html. Thanks a lot!