Toggle navigation
MeasureThat
.net
Create a benchmark
Tools
Feedback
FAQ
Register
Log In
FindIndex + splice vs filter55555
(version: 1)
Comparing performance of:
FindIndex + splice vs filter
Created:
8 months ago
by:
Guest
Go to the latest result
Script Preparation code:
var arr = new Array(15000); arr.fill({ id: 0 }); arr = arr.map((el, idx) => el.id = idx);
Tests:
FindIndex + splice
var newArr = arr.splice(10000, 1);
filter
var newArr2 = arr.filter((el, i) => i != 10000)
Rendered benchmark preparation results:
Suite status:
<idle, ready to run>
Run tests (2)
Previous results
Fork
Test case name
Result
FindIndex + splice
filter
Fastest:
N/A
Slowest:
N/A
Latest run results:
Run details:
(Test run date:
8 months ago
)
User agent:
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/142.0.0.0 Safari/537.36
Browser/OS:
Chrome 142 on Windows
View result in a separate tab
Embed
Embed Benchmark Result
FindIndex + splice
87.5M/s
filter
47K/s
View exact numbers
Test name
Executions per second
✓
FindIndex + splice
87,535,040 Ops/sec
filter
47,387 Ops/sec
Related benchmarks
FindIndex + splice vs filter
FindIndex + splice vs filter FindIndex
JS filter vs splice +indexOf
indexOf + splice vs. filter
FindIndex + splice vs filter ( small )
Comments
Confirm delete:
Do you really want to delete benchmark?