|
|
|
|
|
by emilecantin
1011 days ago
|
|
Yes, Javascript is used in browsers and has a few different competing runtimes, and as such, there are a lot of resources invested in making it faster than the other runtimes. 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. |
|