/
githubmirror
/
node
Обзор
Документация
Войти
/
githubmirror
/
node
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
v20.20.2
benchmark/process/queue-microtask-breadth.js
21 строка
302 B
Antoine du Hamel
benchmark: add trailing commas in `benchmark/process`
05 фев 2023, 14:00
Не верифицирован
05 фев 2023, 14:00
f466fe5
Код
Авторство
О чём код?
'use strict'; const common = require('../common.js'); const bench = common.createBenchmark(main, { n: [4e5], }); function main({ n }) { let j = 0; function cb() { j++; if (j === n) bench.end(n); } bench.start(); for (let i = 0; i < n; i++) { queueMicrotask(cb); } }