mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-06 01:47:48 +00:00
Add _.unzip. [closes #225]
Former-commit-id: 4b2c7fc068fd430f3d78de850a5f7670fd0e1a4e
This commit is contained in:
32
perf/perf.js
32
perf/perf.js
@@ -487,6 +487,10 @@
|
||||
var _findWhere = _.findWhere || _.find,\
|
||||
lodashFindWhere = lodash.findWhere || lodash.find,\
|
||||
whereObject = { "num": 9 };\
|
||||
}\
|
||||
if (typeof zip != "undefined") {\
|
||||
var unzipped = [["a", "b", "c"], [1, 2, 3], [true, false, true]],\
|
||||
zipped = [["a", 1, true], ["b", 2, false], ["c", 3, true]];\
|
||||
}'
|
||||
});
|
||||
|
||||
@@ -1752,6 +1756,20 @@
|
||||
|
||||
/*--------------------------------------------------------------------------*/
|
||||
|
||||
suites.push(
|
||||
Benchmark.Suite('`_.unzip`')
|
||||
.add(buildName, {
|
||||
'fn': 'lodash.unzip(zipped);',
|
||||
'teardown': 'function zip(){}'
|
||||
})
|
||||
.add(otherName, {
|
||||
'fn': '_.unzip(zipped);',
|
||||
'teardown': 'function zip(){}'
|
||||
})
|
||||
);
|
||||
|
||||
/*--------------------------------------------------------------------------*/
|
||||
|
||||
suites.push(
|
||||
Benchmark.Suite('`_.values`')
|
||||
.add(buildName, '\
|
||||
@@ -1802,6 +1820,20 @@
|
||||
|
||||
/*--------------------------------------------------------------------------*/
|
||||
|
||||
suites.push(
|
||||
Benchmark.Suite('`_.zip`')
|
||||
.add(buildName, {
|
||||
'fn': 'lodash.zip.apply(lodash, unzipped);',
|
||||
'teardown': 'function zip(){}'
|
||||
})
|
||||
.add(otherName, {
|
||||
'fn': '_.zip.apply(_, unzipped);',
|
||||
'teardown': 'function zip(){}'
|
||||
})
|
||||
);
|
||||
|
||||
/*--------------------------------------------------------------------------*/
|
||||
|
||||
if (Benchmark.platform + '') {
|
||||
log(Benchmark.platform);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user