Skip to content

Benchmarks ​

Async iteration and operator overhead for 100,000 inputs. Bars show median elapsed seconds across 7 runs after 5 warmups; shorter is faster. Each panel has its own scale.

Sequential async map; concurrent ordered map; 13-stage map/filter pipeline. Node.js and Bun elapsed times in seconds.

Node.js v26.13.0 / Bun v1.4.3 · Apple M1 Pro · Normal GC.

ChartWorkload
Sequential async mapconcurrency: 1, capacity: 1
Concurrent ordered mapconcurrency: 8, capacity: 16, input-order output
13-stage map/filter pipelineID projection followed by six increment/filter pairs, excluding multiples of 97

Inputs come from an async generator. Map callbacks await Promise.resolve(); the workloads contain no timer or network waits.

Reproduction ​

Requires Node.js, Bun, pnpm, and uv.

sh
pnpm install --frozen-lockfile
pnpm bench:svg

# Re-render saved results:
pnpm bench:svg --reuse

The chart uses the default normal GC condition (--gc=none). See benchmark methodology and CLI options for individual workloads and JSON output.

pnpm bench also includes broadcast-balanced (eight balanced consumers) and broadcast-lagging (two consumers, one reading in capacity-sized batches) with synchronous input. Both check each branch's output order, count, capacity, and completion. Select cases with --case=broadcast-balanced,broadcast-lagging; measurement settings and JSON output use the common runner.

The route-* cases in pnpm bench measure numeric, keyed, and predicate routing, asynchronous sources and selectors, ignored items, defaults after detachment, and slow consumers. They check destinations, order, counts, checksums, capacity, and completion. Select individual cases with the common --case option; see the workload list and measurement settings.