Optimize _.pairs.

Former-commit-id: 1de87609a8635fb8d48bc558fbdabc545da53b4b
This commit is contained in:
John-David Dalton
2012-08-31 15:45:27 -07:00
parent 84d69fa2a1
commit 2c31411ffb
4 changed files with 29 additions and 4 deletions

View File

@@ -864,6 +864,18 @@
/*--------------------------------------------------------------------------*/
suites.push(
Benchmark.Suite('`_.invert`')
.add('Lo-Dash', '\
lodash.invert(object)'
)
.add('Underscore', '\
_.invert(object)'
)
);
/*--------------------------------------------------------------------------*/
suites.push(
Benchmark.Suite('`_.invoke` iterating an array')
.add('Lo-Dash', '\
@@ -1104,6 +1116,18 @@
/*--------------------------------------------------------------------------*/
suites.push(
Benchmark.Suite('`_.pairs`')
.add('Lo-Dash', '\
lodash.pairs(object)'
)
.add('Underscore', '\
_.pairs(object)'
)
);
/*--------------------------------------------------------------------------*/
suites.push(
Benchmark.Suite('`_.pick`')
.add('Lo-Dash', '\