4 ms·
probably be an order of magnitude faster than the JS implementation What makes you think so?
by TekMol 2y ago
probably be an order of magnitude
faster than the JS implementation
What makes you think so?
- thot_experiment 2y agoOff 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.
- TekMol 2y agoCompiling 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.
- thot_experiment 2y agoI 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
- TekMol 2y agoAwesome. I will notice when you reply here, no matter when. I routinely check for new replies even to old comments.
- flohofwoe 2y agoYou 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).