benchmarks/map.js
// Map series: 100000 promises handled in 339 ms
Map series: 100000 promises handled in 339 ms
Map series : 100000 promises handled in 339 ms
async function run() {
  await benchmark(
    () => map((f) => f(), createPromiseFuncs()),
    "Map (concurrency: 3)"
  );
  await benchmark(
    () => mapWithOptions((f) => f(), { concurrency: 1 }, createPromiseFuncs()),
    "Map (concurrency: 1)"
  );
  await benchmark(
    () => mapSeries((f) => f(), createPromiseFuncs()),
    "Map series"
  );
}
async function run ( ) { await benchmark ( ( ) => map ( ( f ) => f ( ) , createPromiseFuncs ( ) ) , "Map (concurrency: 3)" ) ; await benchmark ( ( ) => mapWithOptions ( ( f ) => f ( ) , { concurrency : 1 } , createPromiseFuncs ( ) ) , "Map (concurrency: 1)" ) ; await benchmark ( ( ) => mapSeries ( ( f ) => f ( ) , createPromiseFuncs ( ) ) , "Map series" ) ; }
Map series: 100000 promises handled in 339 ms
Map series : 100000 promises handled in 339 ms