mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-01-29 06:27:49 +00:00
Fix typo in _.values benchmark and tweak how percents are displayed in perf.js.
Former-commit-id: 49be4600561e55e134d3152b00c765e305af98b5
This commit is contained in:
@@ -149,9 +149,9 @@
|
||||
else {
|
||||
var fastestHz = fastest[0] == this[0] ? lodashHz : underscoreHz,
|
||||
slowestHz = slowest[0] == this[0] ? lodashHz : underscoreHz,
|
||||
percent = formatNumber(Math.round(((fastestHz / slowestHz) - 1) * 100));
|
||||
percent = ((fastestHz / slowestHz) - 1) * 100;
|
||||
|
||||
log(fastest[0].name + ' is ' + percent + '% faster.');
|
||||
log(fastest[0].name + ' is ' + formatNumber(percent < 1 ? percent.toFixed(2) : Math.round(percent)) + '% faster.');
|
||||
}
|
||||
// add score adjusted for margin of error
|
||||
score.lodash += lodashHz;
|
||||
@@ -604,10 +604,10 @@
|
||||
suites.push(
|
||||
Benchmark.Suite('values')
|
||||
.add('Lo-Dash', function() {
|
||||
lodash.values(objects);
|
||||
lodash.values(object);
|
||||
})
|
||||
.add('Underscore', function() {
|
||||
_.values(objects);
|
||||
_.values(object);
|
||||
})
|
||||
);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user