Toggle navigation
MeasureThat.net
Create a benchmark
Tools
Feedback
FAQ
Register
Log In
weqwqewwqe
(version: 0)
qwewqewe
Comparing performance of:
filter vs slice
Created:
6 years ago
by:
Guest
Jump to the latest result
HTML Preparation code:
<script src='https://cdnjs.cloudflare.com/ajax/libs/lodash.js/4.17.5/lodash.min.js'></script> <script src='https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.js'></script>
Script Preparation code:
var a = [{"key":3, "b": 2},{"key":44, "d": 2},{"key":1, "f": 2}];
Tests:
filter
a.filter(modifier => modifier.key === 1)
slice
a.splice(a.findIndex((elem) => { return elem.key === 1 } ), 1);
Rendered benchmark preparation results:
Suite status:
<idle, ready to run>
Run tests (2)
Previous results
Fork
Test case name
Result
filter
slice
Fastest:
N/A
Slowest:
N/A
Latest run results:
No previous run results
This benchmark does not have any results yet. Be the first one
to run it!
Related benchmarks:
get lodash perf
lodash eachfor
lodash.keys [4.17.11] vs Object.keys
circleTest
CircleSmallTest
Comments
Confirm delete:
Do you really want to delete benchmark?