4 ms·
> I'm not at all the surprised that tuned Javascript can be as performant as pre-compiled Javascript. Well you must be smarter than I am (which is not saying
by skywal_l 4y ago
> I'm not at all the surprised that tuned Javascript can be as performant as pre-compiled Javascript.
Well you must be smarter than I am (which is not saying much).
For my grug brain, an untyped memory-managed interpreted language will be at a significant disadvantage against a typed compiled language whatever the use case. It's a testament to the Chrome dev team's hard work.
It is also possible that the WASM VM has not benefited from as much love as the JS VM.
- actionfromafar 4y agoI have also a bit of a grug [0] brain, but this old brain has become accustomed to the idea that JIT and other optimisation passes can cram out such an insane amount of inference that it will find the fastest code possible. Effectively finding the hand-tuned equivalent. I first got this hunch looking at the JVM. Couldn't hand code JVM instructions which run faster than Java code. But both the hand coded "JVM assembly" and the generated assembly benefited from JIT passes. What remains then, is compiling to native. This is where C shines and Javascript doesn't. Because of it's data model, Javascript just can't take advantage of what you could do in plain C. 0: This rambling "explanation" is exhibit A