Toggle navigation
MeasureThat.net
Create a benchmark
Tools
Feedback
FAQ
Register
Log In
Array.find vs lodash _.includes vs compiled regex
(version: 0)
Compare the new ES6 spread operator with the traditional concat() method
Comparing performance of:
array find vs _.find vs regex vs regex (i)
Created:
5 years ago
by:
Guest
Jump to the latest result
HTML Preparation code:
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/lodash.js/4.17.11/lodash.core.js"></script>
Script Preparation code:
var strings = [ 'one', 'two', 'three' ] var regex = /^(one|two|three)$/; var input = 'three'
Tests:
array find
// Native !!strings.find(function (o) { return o == input; })
_.find
!!_.find(users, function (o) { return o==input; })
regex
regex.test(input)
regex (i)
regex.test(input)
Rendered benchmark preparation results:
Suite status:
<idle, ready to run>
Run tests (4)
Previous results
Fork
Test case name
Result
array find
_.find
regex
regex (i)
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:
native find vs lodash _.find..
Array.prototype.find vs _.find vs regex
array find vs some vs lodash
Compare prototype.find vs lodash/find
Comments
Confirm delete:
Do you really want to delete benchmark?