/
githubmirror
/
node
Обзор
Документация
Войти
/
githubmirror
/
node
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
main
benchmark/napi/define_properties/index.js
15 строк
357 B
Gabriel Schulhof
node-api: provide napi_define_properties fast path
16 июн 2023, 04:07
16 июн 2023, 04:07
3c35cd4
Код
Авторство
О чём код?
'use strict'; const common = require('../../common.js'); const binding = require(`./build/${common.buildType}/binding`); const bench = common.createBenchmark(main, { n: [5e6], implem: ['runFastPath', 'runSlowPath'], }); function main({ n, implem }) { const objs = Array(n).fill(null).map((item) => new Object()); binding[implem](bench, objs); }