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; Ubuntu; Linux x86_64; rv:124.0) Gecko/20100101 Firefox/124.0
Browser:
Firefox 124
Operating system:
Ubuntu
Device Platform:
Desktop
Date tested:
2 years ago
filter
1.3M/s
slice
754K/s
View exact numbers
Test name
Executions per second
✓
filter
1,305,494 Ops/sec
slice
754,247 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)