From 94386583e2fc776c57b680d0049de2268b9da992 Mon Sep 17 00:00:00 2001 From: John-David Dalton Date: Sun, 9 Nov 2014 22:48:09 -0800 Subject: [PATCH] Remove less useful benchmarks from perf.js. --- perf/perf.js | 36 +++--------------------------------- 1 file changed, 3 insertions(+), 33 deletions(-) diff --git a/perf/perf.js b/perf/perf.js index 3f78960d9..ed682ed54 100644 --- a/perf/perf.js +++ b/perf/perf.js @@ -343,7 +343,7 @@ }\ }\ 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; };\ \ 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( Benchmark.Suite('`_(...).map(...).filter(...).take(...).value()`') .add(buildName, { - 'fn': 'lodashChaining.map(square).filter(odd).take(100).value()', + 'fn': 'lodashChaining.map(square).filter(even).take(100).value()', 'teardown': 'function chaining(){}' }) .add(otherName, { - 'fn': '_chaining.map(square).filter(odd).take(100).value()', + 'fn': '_chaining.map(square).filter(even).take(100).value()', 'teardown': 'function chaining(){}' }) );