From 82662666392a86f29f8ba9b98c808c74643dfed4 Mon Sep 17 00:00:00 2001 From: John-David Dalton Date: Thu, 16 Jul 2015 21:42:45 -0700 Subject: [PATCH] Update vendor/benchmark.js. --- vendor/benchmark.js/benchmark.js | 31 +++++++------------------------ vendor/benchmark.js/nano.jar | Bin 293 -> 725 bytes 2 files changed, 7 insertions(+), 24 deletions(-) diff --git a/vendor/benchmark.js/benchmark.js b/vendor/benchmark.js/benchmark.js index 7111261c3..1c8be39bd 100644 --- a/vendor/benchmark.js/benchmark.js +++ b/vendor/benchmark.js/benchmark.js @@ -38,7 +38,7 @@ /** Detect free variable `require`. */ var freeRequire = typeof require == 'function' && require; - /** Used to assign each benchmark an incrimented id. */ + /** Used to assign each benchmark an incremented id. */ var counter = 0; /** Detect the popular CommonJS extension `module.exports`. */ @@ -124,7 +124,7 @@ */ function runInContext(context) { // Exit early if unable to acquire lodash. - var _ = context && context._ || req('lodash') || root._; + var _ = context && context._ || req('lodash-compat') || req('lodash') || root._; if (!_) { Benchmark.runInContext = runInContext; return Benchmark; @@ -1440,7 +1440,7 @@ function getZ(u) { return (u - ((size1 * size2) / 2)) / sqrt((size1 * size2 * (size1 + size2 + 1)) / 12); } - // Reject the null hyphothesis the two samples come from the + // Reject the null hypothesis the two samples come from the // same population (i.e. have the same median) if... if (size1 + size2 > 30) { // ...the z-stat is greater than 1.96 or less than -1.96 @@ -1818,8 +1818,8 @@ /*----------------------------------------------------------------------*/ // Detect nanosecond support from a Java applet. - _.each(doc && doc.applets || [], function(element) { - return !(timer.ns = applet = 'nanoTime' in element && element); + _.find(doc && _.union(doc.applets, doc.embeds, doc.getElementsByTagName('object')) || [], function(element) { + return timer.ns = applet = 'nanoTime' in element && element; }); // Check type in case Safari returns an object instead of a number. @@ -1847,7 +1847,7 @@ timers.push({ 'ns': timer.ns, 'res': getRes('us'), 'unit': 'us' }); } // Pick timer with highest resolution. - timer = _.min(timers, 'res'); + timer = (_.minBy || _.min)(timers, 'res'); // Remove unused applet. if (timer.unit != 'ns' && applet) { @@ -2085,7 +2085,7 @@ if (!clocked && (divisor = divisors[clone.cycles]) != null) { count = floor(4e6 / divisor); } - // Calculate how many more iterations it will take to achive the `minTime`. + // Calculate how many more iterations it will take to achieve the `minTime`. if (count <= clone.count) { count += Math.ceil((minTime - clocked) / period); } @@ -2811,23 +2811,6 @@ }; }); - // Avoid array-like object bugs with `Array#shift` and `Array#splice` - // in Firefox < 10 and IE < 9. - if (!_.support.spliceObjects) { - _.each(['pop', 'shift', 'splice'], function(methodName) { - var func = arrayRef[methodName]; - - Suite.prototype[methodName] = function() { - var value = this, - result = func.apply(value, arguments); - - if (value.length === 0) { - delete value[0]; - } - return result; - }; - }); - } // Avoid buggy `Array#unshift` in IE < 8 which doesn't return the new // length of the array. if (!support.unshiftResult) { diff --git a/vendor/benchmark.js/nano.jar b/vendor/benchmark.js/nano.jar index b5778403b61d721d63f45f72ed1a9fe99a93a422..442bbe10a4c0a70b4fa0b401a0ada2508bc9b3cf 100644 GIT binary patch delta 544 zcmZ3=bd{AOz?+#xgn@x$;zJPu7KXgUynManoW$bdf2SB2CTc9Khsbg;9Atdyw#Ddu zNeKf3Lp=}!^)UFlhB)ea`nl=*I{JCKxdw;m`MSyW*m55-5ODb3{HI+y)MMoWg_~P8 z%THb%Gh3J`SMN^hh5GzgKjiw$m(IDDbJadl*OPC@`zrS5LC;JAbC2E6c-Sy=lSRb_ zy_452FiAbNI8}fApu$A=O<`}PG=iVL(7*q+^wqEH4?AY>zGPy|x5)L&|GQQNADBU& z-~u{`fuXGXh1AP=Ij-cr!AIfIjv1GCB|O0$clUQ6lQD>npJBL+5=;Zl8@e@EC k;LXS+!hq0=ECmUvT0J>2UWdHyG