Skip to content

Add allocation_binary_trees benchmark#118

Open
danvinci wants to merge 16 commits intoJuliaLang:masterfrom
danvinci:bench-binary-trees
Open

Add allocation_binary_trees benchmark#118
danvinci wants to merge 16 commits intoJuliaLang:masterfrom
danvinci:bench-binary-trees

Conversation

@danvinci
Copy link
Copy Markdown

@danvinci danvinci commented May 4, 2026

Adds allocation_binary_trees - a memory-allocation / traversal benchmark - implemented similarly across all 14 languages.

Each iteration builds a complete binary tree of depth 14 (16,383 nodes), traverses it to compute a node-count checksum, and frees it. 25 iterations per timed window, NITER=5, taking minimum.
Each language uses its idiomatic allocation strategy: malloc/free in C, new/GC in Java/Go/JS/Swift/Scala, structs in Julia/Rust, dicts/lists in Python/Numba/R/Octave, tables in Lua, allocatable types in Fortran.

The existing 8 benchmarks are mostly numeric / BLAS-leaning; this one probes a dimension where allocation strategy and GC dominate timing.

Test plan

  • Verified locally on macOS arm64: all 14 implementations compile and emit lang,allocation_binary_trees,time_ms
  • All in-language assertions pass
  • CI workflow passes for all 14 language benchmarks
  • report job (aggregation + deploy) passes
  • Documentation build succeeds (Documenter preview deployed)

Drafted with assistance from Claude Opus 4.7.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant