/
erioxis
/
web-nodejs
Обзор
Документация
Войти
/
erioxis
/
web-nodejs
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
CI/CD
Аналитика
Безопасность
master
backend/node_modules/fastparallel/bench_long.js
41 строка
751 B
erioxis
lab11fix
15 дек 2025, 23:21
15 дек 2025, 23:21
70dc7ba
Код
Авторство
О чём код?
var max = 1000000 var parallel = require('./')() var parallelNoResults = require('./')({ results: false }) var bench = require('fastbench') var async = require('async') var neo = require('neo-async') var funcs = [] for (var i = 0; i < 25; i++) { funcs.push(something) } function benchFastParallel (done) { parallel(null, funcs, 42, done) } function benchFastParallelNoResults (done) { parallelNoResults(null, funcs, 42, done) } function benchAsyncParallel (done) { async.parallel(funcs, done) } function benchNeoParallel (done) { neo.parallel(funcs, done) } function something (cb) { setImmediate(cb) } var run = bench([ benchAsyncParallel, benchNeoParallel, benchFastParallel, benchFastParallelNoResults ], max) run(run)