Toggle navigation
MeasureThat.net
Create a benchmark
Tools
Feedback
FAQ
Register
Log In
Run results for:
array.splice vs for loop with 2 arrays
Go to the benchmark
Embed
Embed Benchmark Result
Run details:
User agent:
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/134.0.0.0 Safari/537.36
Browser:
Chrome 134
Operating system:
Windows
Device Platform:
Desktop
Date tested:
one year ago
Test name
Executions per second
array.splice
643831.5 Ops/sec
for loop
416554.6 Ops/sec
Script Preparation code:
a = Array(10000); b = Array(300)
Tests:
array.splice
a.splice(0, b.length, ...b);
for loop
for (let i = 0; i < b.length; i++) { a[i] = b[i]; }