3 ms·
I laughed, but really, the V8 JavaScript engine has come leaps and bounds in terms of performance. I recall a benchmark that found JS about 25% slower than C++,
by lioeters 7y ago
I laughed, but really, the V8 JavaScript engine has come leaps and bounds in terms of performance. I recall a benchmark that found JS about 25% slower than C++, but 20% faster than Java. (citation needed)
- hackingthenews 7y agoThat really depends on what was benchmarked, so much so that dropping random benchmark results is meaningless. A benchmark like this [1] (showing c++ < js < java) is absolutely useless as the person writing it has no idea what they are doing, e.g. using vector in java. Looking at most benchmarks java beats js more often than not, but they are often neck in neck.[2] C++ always beats both, often by a huge margin (when written well).[3] [1] https://www.linkedin.com/pulse/algorithmic-performance-comparison-c-javascript-java-malyshev https://www.linkedin.com/pulse/algorithmic-performance-compa... [2] https://benchmarksgame-team.pages.debian.net/benchmarksgame/fastest/javascript.html https://benchmarksgame-team.pages.debian.net/benchmarksgame/... [3] https://benchmarksgame-team.pages.debian.net/benchmarksgame/fastest/node-gpp.html https://benchmarksgame-team.pages.debian.net/benchmarksgame/...
- lioeters 7y agoThank you for setting the record straight(er), I appreciated looking at some real benchmarks. The one for k-nucleotide looked like it pushed JS the hardest for some reason. Interesting to compare how different languages fare: https://benchmarksgame-team.pages.debian.net/benchmarksgame/performance/knucleotide.html https://benchmarksgame-team.pages.debian.net/benchmarksgame/... In this one, Java was 2.3x slower than C++, and Node.js 6.6x. Oof, I concede. "JS has been able to do roughly what C did in the 1990's."