Toggle navigation
MeasureThat.net
Create a benchmark
Tools
Feedback
FAQ
Register
Log In
js includes inside filter
(version: 0)
Comparing performance of:
filter vs includes
Created:
5 years ago
by:
Guest
Jump to the latest result
Script Preparation code:
var options = [1,2,3,4,5,6]
Tests:
filter
return options.filter((option) => option !== 1 && option !== 2)
includes
return options.filter((option) => ![1,2].includes(option))
Rendered benchmark preparation results:
Suite status:
<idle, ready to run>
Run tests (2)
Previous results
Fork
Test case name
Result
filter
includes
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:
Filter: Lodash vs Native
Array.prototype.filter vs Lodash filter
lodash v native filter
Filter: Lodash 2 vs Native
Array.prototype.filter vs Lodash filter (Even Numbers)
Comments
Confirm delete:
Do you really want to delete benchmark?