mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-10 19:07:49 +00:00
Remove less useful benchmarks from perf.js.
This commit is contained in:
36
perf/perf.js
36
perf/perf.js
@@ -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(){}'
|
||||||
})
|
})
|
||||||
);
|
);
|
||||||
|
|||||||
Reference in New Issue
Block a user