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

Off the rip because I didn't spend time to make the JS implementation keep all of it's data in a typed array that I manually manage, because it's tedious to do that in JS and it's straightforward in C. Though I'm betting there are other benefits I'll get from -O2 and static analysis.


Compiling your C to WASM might make it run twice as fast as compiling it to JS.

That's all. All other aspects of the workflow are the same.


I will try but I suspect the final score will be

    1. WASM
    2. JS handwritten for speed
    3. C compiled to JS
and the gaps will be greater than 2x


You forgot 'C compiled to the asm.js subset of Javascript', that would be on second place right after WASM (the switch from asm.js to WASM was hardly noticeable in my C/C++ code performance-wise - some browsers had special 'fast paths' for the asm.js subset though).


Awesome. I will notice when you reply here, no matter when. I routinely check for new replies even to old comments.




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

Search: