mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-01-29 06:27:49 +00:00
Tweak _.find to avoid using _.identity and add benchmark.
Former-commit-id: a881f90d00828ed6af5b2b0bc80c9ae6e2cb2da8
This commit is contained in:
16
perf/perf.js
16
perf/perf.js
@@ -205,6 +205,22 @@
|
||||
|
||||
/*--------------------------------------------------------------------------*/
|
||||
|
||||
suites.push(
|
||||
Benchmark.Suite('find')
|
||||
.add('Lo-Dash', function() {
|
||||
lodash.find(numbers, function(num) {
|
||||
return num === 19;
|
||||
});
|
||||
})
|
||||
.add('Underscore', function() {
|
||||
_.find(numbers, function(num) {
|
||||
return num === 19;
|
||||
});
|
||||
})
|
||||
);
|
||||
|
||||
/*--------------------------------------------------------------------------*/
|
||||
|
||||
suites.push(
|
||||
Benchmark.Suite('flatten deep')
|
||||
.add('Lo-Dash', function() {
|
||||
|
||||
Reference in New Issue
Block a user