Toggle navigation
MeasureThat.net
Create a benchmark
Tools
Feedback
FAQ
Register
Log In
Run results for:
Array splice vs delete
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/126.0.0.0 Safari/537.36 OPR/112.0.0.0
Browser:
Opera 112
Operating system:
Windows
Device Platform:
Desktop
Date tested:
one year ago
Test name
Executions per second
delete
13761978.0 Ops/sec
splice
14007284.0 Ops/sec
Script Preparation code:
var array = [].fill(1,0,10000)
Tests:
delete
for(var x=0; x<array.length; x++){ delete array[x] }
splice
while(array.length - 3 > 0){ array.splice(2,1) }