Skip to content

Commit 1b08898

Browse files
committed
benchmark: remove deprecated _extend from benchmark
1 parent 0df1518 commit 1b08898

File tree

1 file changed

+4
-9
lines changed

1 file changed

+4
-9
lines changed

benchmark/es/spread-assign.js

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
'use strict';
22

33
const common = require('../common.js');
4-
const util = require('util');
4+
const assert = require('node:assert');
55

66
const bench = common.createBenchmark(main, {
7-
method: ['spread', 'assign', '_extend'],
7+
method: ['spread', 'assign'],
88
count: [5, 10, 20],
99
n: [1e6],
1010
});
1111

12-
function main({ n, context, count, rest, method }) {
12+
function main({ n, count, method }) {
1313

1414
const src = {};
1515
for (let n = 0; n < count; n++)
@@ -18,12 +18,6 @@ function main({ n, context, count, rest, method }) {
1818
let obj;
1919

2020
switch (method) {
21-
case '_extend':
22-
bench.start();
23-
for (let i = 0; i < n; i++)
24-
obj = util._extend({}, src);
25-
bench.end(n);
26-
break;
2721
case 'assign':
2822
bench.start();
2923
for (let i = 0; i < n; i++)
@@ -39,4 +33,5 @@ function main({ n, context, count, rest, method }) {
3933
default:
4034
throw new Error('Unexpected method');
4135
}
36+
assert.ok(obj);
4237
}

0 commit comments

Comments
 (0)