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) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/134.0.0.0 YaBrowser/25.4.0.0 Safari/537.36
Browser:
Yandex Browser 25
Operating system:
Windows
Device Platform:
Desktop
Date tested:
one year ago
filter array method
40.6M/s
copy and splice
3.7M/s
View exact numbers
Test name
Executions per second
✓
filter array method
40,619,100 Ops/sec
copy and splice
3,724,785 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});