Add _.sortedIndex benchmark. [ci skip]

This commit is contained in:
John-David Dalton
2014-12-30 21:15:52 -06:00
parent 6a3c1bdb99
commit 10e329f762

View File

@@ -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, {