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:
one year ago
filter array method
16.8M/s
copy and splice
9.8M/s
View exact numbers
Test name
Executions per second
✓
filter array method
16,806,946 Ops/sec
copy and splice
9,837,435 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});