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.
Node.js v26.13.0 / Bun v1.4.3 · Apple M1 Pro · Normal GC.
| Chart | Workload |
|---|---|
| Sequential async map | concurrency: 1, capacity: 1 |
| Concurrent ordered map | concurrency: 8, capacity: 16, input-order output |
| 13-stage map/filter pipeline | ID 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.
pnpm install --frozen-lockfile
pnpm bench:svg
# Re-render saved results:
pnpm bench:svg --reuseThe 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.