Add _.findWhere benchmark and removenew bound benchmark.

Former-commit-id: baef485421cf6419450e3bc2a14f36e7e7c437c3
This commit is contained in:
John-David Dalton
2013-01-30 08:58:55 -08:00
parent 6632241ab5
commit afbb2c338b

View File

@@ -205,11 +205,9 @@
};\
\
var lodashBoundNormal = lodash.bind(func, contextObject),\
lodashBoundCtor = lodash.bind(ctor, contextObject),\
lodashBoundPartial = lodash.bind(func, contextObject, "hi");\
\
var _boundNormal = _.bind(func, contextObject),\
_boundCtor = _.bind(ctor, contextObject),\
_boundPartial = _.bind(func, contextObject, "hi");\
}\
\
@@ -534,18 +532,6 @@
})
);
suites.push(
Benchmark.Suite('bound and called in a `new` expression, i.e. `new bound` (edge case)')
.add(buildName, {
'fn': 'new lodashBoundCtor()',
'teardown': 'function bind(){}'
})
.add(otherName, {
'fn': 'new _boundCtor()',
'teardown': 'function bind(){}'
})
);
/*--------------------------------------------------------------------------*/
suites.push(
@@ -870,6 +856,16 @@
)
);
suites.push(
Benchmark.Suite('`_.find` with `properties`')
.add(buildName, '\
lodash.find(objects, { "num": 9 });'
)
.add(otherName, '\
_.findWhere(objects, { "num": 9 });'
)
);
/*--------------------------------------------------------------------------*/
suites.push(