Remove less useful benchmarks from perf.js.

This commit is contained in:
John-David Dalton
2014-11-09 22:48:09 -08:00
parent b1ab63d549
commit 94386583e2

View File

@@ -343,7 +343,7 @@
}\ }\
}\ }\
if (typeof chaining != "undefined") {\ if (typeof chaining != "undefined") {\
var odd = function(v) { return !!(v % 2); },\ var even = function(v) { return v % 2 == 0; },\
square = function(v) { return v * v; };\ square = function(v) { return v * v; };\
\ \
var largeArray = belt.range(10000),\ var largeArray = belt.range(10000),\
@@ -540,44 +540,14 @@
/*--------------------------------------------------------------------------*/ /*--------------------------------------------------------------------------*/
suites.push(
Benchmark.Suite('`_(...)` with a number (edge case)')
.add(buildName, '\
lodash(2)'
)
.add(otherName, '\
_(2)'
)
);
suites.push(
Benchmark.Suite('`_(...)` with an array')
.add(buildName, '\
lodash(numbers)'
)
.add(otherName, '\
_(numbers)'
)
);
suites.push(
Benchmark.Suite('`_(...)` with an object (slow path)')
.add(buildName, '\
lodash(object)'
)
.add(otherName, '\
_(object)'
)
);
suites.push( suites.push(
Benchmark.Suite('`_(...).map(...).filter(...).take(...).value()`') Benchmark.Suite('`_(...).map(...).filter(...).take(...).value()`')
.add(buildName, { .add(buildName, {
'fn': 'lodashChaining.map(square).filter(odd).take(100).value()', 'fn': 'lodashChaining.map(square).filter(even).take(100).value()',
'teardown': 'function chaining(){}' 'teardown': 'function chaining(){}'
}) })
.add(otherName, { .add(otherName, {
'fn': '_chaining.map(square).filter(odd).take(100).value()', 'fn': '_chaining.map(square).filter(even).take(100).value()',
'teardown': 'function chaining(){}' 'teardown': 'function chaining(){}'
}) })
); );