Node.js 14 is over 2x faster than OpenJDK HotSpot Java 15 for fib(n)

Not the most comprehensive benchmark, but the results are surprising to me. // (Node.js v14.14.0) const { performance } = require(‘perf_hooks’); function fib(n) { let num1 = 0; for (let i = 0, num2 = 1; i < n; ++i) { let num3 = (num2 + num1); num1 = nu… Read more

Similar