From 7b44ef1664062f7993dd6dfe0d7715c210334d71 Mon Sep 17 00:00:00 2001 From: John-David Dalton Date: Sun, 20 May 2012 04:32:57 -0400 Subject: [PATCH] Cleanup pref.'s style and add comment. Former-commit-id: ab01044b50ef4a6d447e3e937c31cf5747b3113b --- perf/perf.js | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/perf/perf.js b/perf/perf.js index eab07b4d9..fea1fbb2a 100644 --- a/perf/perf.js +++ b/perf/perf.js @@ -75,6 +75,7 @@ } else { console.log(fastest + ' is the fastest.'); } + // add score adjusting for maring of error score.lodash += Math.floor(1 / (this[0].stats.mean + this[0].stats.moe)); score.underscore += Math.floor(1 / (this[1].stats.mean + this[1].stats.moe)); @@ -137,10 +138,10 @@ suites.push( Benchmark.Suite('keys') .add('Lo-Dash', function() { - lodash.keys( object ); + lodash.keys(object); }) .add('Underscore', function() { - _.keys( object ); + _.keys(object); }) ); @@ -149,12 +150,12 @@ suites.push( Benchmark.Suite('map') .add('Lo-Dash', function() { - lodash.map( objects, function( obj ) { + lodash.map(objects, function(obj) { return obj.num; }); }) .add('Underscore', function() { - _.map( objects, function( obj ) { + _.map(objects, function(obj) { return obj.num; }); })