Toggle navigation
MeasureThat.net
Create a benchmark
Tools
Feedback
FAQ
Register
Log In
comparing Array.from copy and then splice with filter method to variable
(version: 0)
comparing copy and splice of array with array's filter method
Comparing performance of:
copy and splice vs filter array method
Created:
4 years ago
by:
Guest
Jump to the latest result
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});
Rendered benchmark preparation results:
Suite status:
<idle, ready to run>
Run tests (2)
Previous results
Fork
Test case name
Result
copy and splice
filter array method
Fastest:
N/A
Slowest:
N/A
Latest run results:
Run details:
(Test run date:
10 months ago
)
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/OS:
Yandex Browser 25 on Windows
View result in a separate tab
Embed
Embed Benchmark Result
Test name
Executions per second
copy and splice
3724784.8 Ops/sec
filter array method
40619100.0 Ops/sec
Related benchmarks:
Array clone
comparing Array.from copy and then splice with filter method
array.splice vs array.length
Clone Array - 08/02/2024
Comments
Confirm delete:
Do you really want to delete benchmark?