mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-09 10:27:49 +00:00
Add _.sortedIndex benchmark. [ci skip]
This commit is contained in:
36
perf/perf.js
36
perf/perf.js
@@ -289,7 +289,7 @@
|
|||||||
belt = this.name == buildName ? lodash : _;\
|
belt = this.name == buildName ? lodash : _;\
|
||||||
\
|
\
|
||||||
var date = new Date,\
|
var date = new Date,\
|
||||||
limit = 20,\
|
limit = 50,\
|
||||||
regexp = /x/,\
|
regexp = /x/,\
|
||||||
object = {},\
|
object = {},\
|
||||||
objects = Array(limit),\
|
objects = Array(limit),\
|
||||||
@@ -760,18 +760,6 @@
|
|||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
|
||||||
suites.push(
|
|
||||||
Benchmark.Suite('`_.difference` iterating 200 elements')
|
|
||||||
.add(buildName, {
|
|
||||||
'fn': 'lodash.difference(twoHundredValues, twoHundredValues2)',
|
|
||||||
'teardown': 'function multiArrays(){}'
|
|
||||||
})
|
|
||||||
.add(otherName, {
|
|
||||||
'fn': '_.difference(twoHundredValues, twoHundredValues2)',
|
|
||||||
'teardown': 'function multiArrays(){}'
|
|
||||||
})
|
|
||||||
);
|
|
||||||
|
|
||||||
suites.push(
|
suites.push(
|
||||||
Benchmark.Suite('`_.difference` iterating 20 and 40 elements')
|
Benchmark.Suite('`_.difference` iterating 20 and 40 elements')
|
||||||
.add(buildName, {
|
.add(buildName, {
|
||||||
@@ -784,6 +772,18 @@
|
|||||||
})
|
})
|
||||||
);
|
);
|
||||||
|
|
||||||
|
suites.push(
|
||||||
|
Benchmark.Suite('`_.difference` iterating 200 elements')
|
||||||
|
.add(buildName, {
|
||||||
|
'fn': 'lodash.difference(twoHundredValues, twoHundredValues2)',
|
||||||
|
'teardown': 'function multiArrays(){}'
|
||||||
|
})
|
||||||
|
.add(otherName, {
|
||||||
|
'fn': '_.difference(twoHundredValues, twoHundredValues2)',
|
||||||
|
'teardown': 'function multiArrays(){}'
|
||||||
|
})
|
||||||
|
);
|
||||||
|
|
||||||
/*--------------------------------------------------------------------------*/
|
/*--------------------------------------------------------------------------*/
|
||||||
|
|
||||||
suites.push(
|
suites.push(
|
||||||
@@ -1835,6 +1835,16 @@
|
|||||||
|
|
||||||
/*--------------------------------------------------------------------------*/
|
/*--------------------------------------------------------------------------*/
|
||||||
|
|
||||||
|
suites.push(
|
||||||
|
Benchmark.Suite('`_.sortedIndex`')
|
||||||
|
.add(buildName, '\
|
||||||
|
lodash.sortedIndex(numbers, limit)'
|
||||||
|
)
|
||||||
|
.add(otherName, '\
|
||||||
|
_.sortedIndex(numbers, limit)'
|
||||||
|
)
|
||||||
|
);
|
||||||
|
|
||||||
suites.push(
|
suites.push(
|
||||||
Benchmark.Suite('`_.sortedIndex` with `callback`')
|
Benchmark.Suite('`_.sortedIndex` with `callback`')
|
||||||
.add(buildName, {
|
.add(buildName, {
|
||||||
|
|||||||
Reference in New Issue
Block a user