by emilecantin · 3y ago · 0 comments
As a result, except in only very trivial cases, Javascript is only slower than C++ by about a factor of 2-4. This is a much smaller difference than the "orders of magnitude" mentioned above.
The following list of benchmarks illustrates this point: https://programming-language-benchmarks.vercel.app/javascrip...
The only exception is "hello world", which is about one order of magnitude slower in JS, but that's probably explained by the runtime startup / teardown.
And C++ compiled to WASM will have the same slowdowns if it needs to touch the DOM.