Skip to content
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
[Squash] Nits
  • Loading branch information
jasnell committed Feb 1, 2018
commit 61b67bcde486152bc01760716b9b61607f4d9853
6 changes: 3 additions & 3 deletions benchmark/es/rest-assign.js → benchmark/es/spread-assign.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ const assert = require('assert');
const util = require('util');

const bench = common.createBenchmark(main, {
method: ['rest', 'assign', '_extend'],
method: ['spread', 'assign', '_extend'],
count: [5, 10, 20],
millions: [1]
});
Expand All @@ -23,7 +23,7 @@ function main({ millions, context, count, rest, method }) {
switch (method) {
case '':
// Empty string falls through to next line as default, mostly for tests.
case 'extend':
case '_extend':
bench.start();
for (i = 0; i < n; i++)
obj = util._extend({}, src);
Expand All @@ -35,7 +35,7 @@ function main({ millions, context, count, rest, method }) {
obj = Object.assign({}, src);
bench.end(n);
break;
case 'rest':
case 'spread':
bench.start();
for (i = 0; i < n; i++)
obj = { ...src };
Expand Down