Toggle navigation
MeasureThat
.net
Create a benchmark
Tools
Feedback
FAQ
Register
Log In
Run results for:
slice vs filter
Go to the benchmark
Embed
Embed Benchmark Result
Run details:
User agent:
Mozilla/5.0 (X11; Linux x86_64; rv:120.0) Gecko/20100101 Firefox/120.0
Browser:
Firefox 120
Operating system:
Linux
Device Platform:
Desktop
Date tested:
2 years ago
filter
3.3M/s
slice
1.6M/s
View exact numbers
Test name
Executions per second
✓
filter
3,272,508 Ops/sec
slice
1,584,841 Ops/sec
Script Preparation code:
var test=Array.from({length: 100},()=>Math.random())
Tests:
slice
[...test.slice(0,50),...test.slice(51)]
filter
test.filter((e,i)=>i!=50)