Hacker News new | ask | show | jobs
by cominous 3118 days ago
Can confirm this. Clever version is actually about 10% faster with node v9.1
1 comments

Actually, the for-based loop is another 10% faster - so if performance is relevant, just use the for-loop!

Node v9.1 + benchmark.js clever-solution x 249,543 ops/sec ±0.36% standard-arrow-function x 213,926 ops/sec ±0.35% old-for-loop x 261,449 ops/sec ±0.54%