mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-01-29 06:27:49 +00:00
Remove compiling from _.every, _.filter, and _.some and add related benchmarks.
Former-commit-id: 545195dc7085c1294ad8709f44fddb0c3c6a0545
This commit is contained in:
60
perf/perf.js
60
perf/perf.js
@@ -693,6 +693,36 @@
|
||||
|
||||
/*--------------------------------------------------------------------------*/
|
||||
|
||||
suites.push(
|
||||
Benchmark.Suite('`_.every` iterating an array')
|
||||
.add(buildName, '\
|
||||
lodash.every(numbers, function(num) {\
|
||||
return num + "";\
|
||||
})'
|
||||
)
|
||||
.add(otherName, '\
|
||||
_.every(numbers, function(num) {\
|
||||
return num + "";\
|
||||
})'
|
||||
)
|
||||
);
|
||||
|
||||
suites.push(
|
||||
Benchmark.Suite('`_.every` iterating an object')
|
||||
.add(buildName, '\
|
||||
lodash.every(object, function(num) {\
|
||||
return num + "";\
|
||||
})'
|
||||
)
|
||||
.add(otherName, '\
|
||||
_.every(object, function(num) {\
|
||||
return num + "";\
|
||||
})'
|
||||
)
|
||||
);
|
||||
|
||||
/*--------------------------------------------------------------------------*/
|
||||
|
||||
suites.push(
|
||||
Benchmark.Suite('`_.filter` iterating an array')
|
||||
.add(buildName, '\
|
||||
@@ -1331,6 +1361,36 @@
|
||||
|
||||
/*--------------------------------------------------------------------------*/
|
||||
|
||||
suites.push(
|
||||
Benchmark.Suite('`_.some` iterating an array')
|
||||
.add(buildName, '\
|
||||
lodash.some(numbers, function(num) {\
|
||||
return num == 19;\
|
||||
})'
|
||||
)
|
||||
.add(otherName, '\
|
||||
_.some(numbers, function(num) {\
|
||||
return num == 19;\
|
||||
})'
|
||||
)
|
||||
);
|
||||
|
||||
suites.push(
|
||||
Benchmark.Suite('`_.some` iterating an object')
|
||||
.add(buildName, '\
|
||||
lodash.some(object, function(num) {\
|
||||
return num == 19;\
|
||||
})'
|
||||
)
|
||||
.add(otherName, '\
|
||||
_.some(object, function(num) {\
|
||||
return num == 19;\
|
||||
})'
|
||||
)
|
||||
);
|
||||
|
||||
/*--------------------------------------------------------------------------*/
|
||||
|
||||
suites.push(
|
||||
Benchmark.Suite('`_.sortBy` with `callback`')
|
||||
.add(buildName, '\
|
||||
|
||||
Reference in New Issue
Block a user