Toggle navigation
MeasureThat.net
Create a benchmark
Tools
Feedback
FAQ
Register
Log In
Run results for:
comparing Array.from copy and then splice with filter method to variable
comparing copy and splice of array with array's filter method
Go to the benchmark
Embed
Embed Benchmark Result
Run details:
User agent:
Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:140.0) Gecko/20100101 Firefox/140.0
Browser:
Firefox 140
Operating system:
Windows
Device Platform:
Desktop
Date tested:
10 months ago
Test name
Executions per second
copy and splice
9837435.0 Ops/sec
filter array method
16806946.0 Ops/sec
Script Preparation code:
var arr = [0,1,2,3,4,5,6,7];
Tests:
copy and splice
var x = Array.from(arr); x.splice(0, 1);
filter array method
var x = arr.filter(function(_, index){ return index !== 0});