3 ms·
It is still quite the claim. Given the disadvantage that it starts at, JavaScript is astonishingly fast, due to the extreme investment in it that you mention.
by chrismorgan 3y ago
It is still quite the claim.
Given the disadvantage that it starts at, JavaScript is astonishingly fast, due to the extreme investment in it that you mention. However, in almost all real-world scenarios, it’s still generally pretty easily beaten by ahead-of-time-compiled languages, even if on some microbenchmarks and for a few specific sorts of tasks it can end up competitive with certain of these compiled languages.
- coldtea 3y ago>However, in almost all real-world scenarios, it’s still generally pretty easily beaten by ahead-of-time-compiled languages The claim to be refuted was not "Javascript is faster than AOT compiled languges" however. Instead, the claim was: "[Javascript is] around the speed of Java and Go in some cases, which are compiled", which is not far off. Especially given that these two are not in general among the fastest kids like C, C++, and Rust.
- chrismorgan 3y agoYeah, what I expressed was a bit sloppy. Go is AOT-compiled, but kinda the weak link among most such languages as regards performance. Java is somewhere in between the two, and the HotSpot JVM is also generally handily faster than JavaScript engines (it also has had rather a lot of effort put into optimising it, and without most of the starting disadvantages of JavaScript).