Skip to content

docs: benchmark results for the 1.0-beta core branch - #561

Merged
awatson1978 merged 1 commit into
release/1.0-beta-corefrom
core/benchmarks
Sep 30, 2026
Merged

awatson1978 merged 1 commit into
release/1.0-beta-corefrom
core/benchmarks

Conversation

@awatson1978

Copy link
Copy Markdown
Collaborator

This adds the benchmark results the RELEASE_PLAN §5 checklist asks for — the last unmet description item on #542 — plus the small harness that produced them, so anyone can re-run the numbers.

I measured the built bundle on both CI-tested Node versions (22.20.0 and 24.9.0, Apple M4 / 16 GB / macOS), on the committed fixtures and on the 211 MB stress file from EXAMPLES.md's make-big recipe. The headlines, consistent across both Node versions:

  • Read, 211 MB file: eager readFile + naturalize lands at ~38–41 ms · 422 MB peak live ArrayBuffer memory; the streaming path to the same naturalized dataset at ~58 ms · ~214–239 MB; and a retain-nothing streaming scan walks the whole file in ~47 ms at 4–16 MB peak — memory bounded by chunk size, not file size.
  • Write, 211 MB file: StreamingPart10Writer is ~10–13× faster at ~1/90th the memory of the buffered writer (≈60 ms · ~9 MB vs 616–813 ms · ~840 MB).
  • Chunk size: 64 KB chunks cost ~2.7× the time of 1 MB chunks for a sub-MB memory floor; 1 MB is the sweet spot (~4.8 GB/s); whole-buffer input buys nothing over 1 MB chunks and costs whole-file memory.

The harness (bench/run.mjs + bench/worker.mjs, pnpm run bench) runs every cell in its own fresh process and reports median wall time with min–max ranges, plus peak live ArrayBuffer memory sampled after forced GC — the honest metric for DICOM payloads, per EXAMPLES.md. BENCHMARKS.md carries the full tables, the method, and the exact reproduction commands.

🤖 Generated with Claude Code

Adds BENCHMARKS.md with eager-vs-streaming read and write measurements on
Node 22 and Node 24 (committed fixtures plus the 211 MB EXAMPLES.md stress
file), a chunk-size throughput table, and the bench/ harness that produced
them (one fresh process per cell, forced-GC live-ArrayBuffer peak sampling).

Co-Authored-By: Claude Fable 5 <[email protected]>
@awatson1978
awatson1978 merged commit c39a305 into release/1.0-beta-core Sep 30, 2026
8 checks passed
@awatson1978
awatson1978 deleted the core/benchmarks branch September 30, 2026 20:00
@github-actions

Copy link
Copy Markdown

🎉 This PR is included in version 1.0.0-beta.1 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant