mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-01-29 06: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 : _;\
|
||||
\
|
||||
var date = new Date,\
|
||||
limit = 20,\
|
||||
limit = 50,\
|
||||
regexp = /x/,\
|
||||
object = {},\
|
||||
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(
|
||||
Benchmark.Suite('`_.difference` iterating 20 and 40 elements')
|
||||
.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(
|
||||
@@ -1835,6 +1835,16 @@
|
||||
|
||||
/*--------------------------------------------------------------------------*/
|
||||
|
||||
suites.push(
|
||||
Benchmark.Suite('`_.sortedIndex`')
|
||||
.add(buildName, '\
|
||||
lodash.sortedIndex(numbers, limit)'
|
||||
)
|
||||
.add(otherName, '\
|
||||
_.sortedIndex(numbers, limit)'
|
||||
)
|
||||
);
|
||||
|
||||
suites.push(
|
||||
Benchmark.Suite('`_.sortedIndex` with `callback`')
|
||||
.add(buildName, {
|
||||
|
||||
Reference in New Issue
Block a user