Run details:
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/131.0.0.0 Safari/537.36
Chrome 131
Windows
Desktop
one year ago
Benchmark.js
with
4.1M/s
toSpliced
4.0M/s
toSpliced insert
3.5M/s
splice
3.3M/s
splice insert
2.8M/s
View exact numbers
Test name Executions per second
with 4,102,588 Ops/sec
toSpliced 4,016,558 Ops/sec
toSpliced insert 3,493,924 Ops/sec
splice 3,293,324 Ops/sec
splice insert 2,824,502 Ops/sec
Script Preparation code:
Tests: