mirror of
https://github.com/zebrajr/node.git
synced 2025-12-06 12:20:27 +01:00
PR-URL: https://github.com/nodejs/node/pull/54012 Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com> Reviewed-By: Michael Dawson <midawson@redhat.com>
16 lines
364 B
JavaScript
16 lines
364 B
JavaScript
'use strict';
|
|
|
|
const common = require('../../common.js');
|
|
|
|
const binding = require(`./build/${common.buildType}/binding`);
|
|
|
|
const bench = common.createBenchmark(main, {
|
|
n: [5e6],
|
|
implem: ['RunPropertyKey', 'RunNormalString'],
|
|
});
|
|
|
|
function main({ n, implem }) {
|
|
const objs = Array(n).fill(null).map((item) => new Object());
|
|
binding[implem](bench, objs);
|
|
}
|