Skip to main content

Draton GC Benchmarks - 2026-03-17

This report publishes the current GC benchmark artifacts for the repository state at commit d3523f5.

The goal is transparency, not a victory lap.

  • Current executable/compiler-path GC scorecard runs are published as JSON.
  • The latest successful GitHub Actions OCaml comparison is published as JSON.
  • The self-host bootstrap workload is still reported as blocked and is not hidden.
  • Draton does not currently beat OCaml on the published microbenchmarks.

Published artifacts

Data sources

Local scorecard:

  • command: python3 tools/gc_scorecard.py --out /tmp/draton-gc-scorecard-phase15.json
  • repository commit: d3523f5
  • environment: local developer machine

GitHub Actions scorecard and OCaml compare:

  • workflow: gc-perf
  • run id: 23203853670
  • repository commit: d3523f5
  • environment: GitHub-hosted Ubuntu runner with LLVM 14 and ocamlopt

Local and GitHub Actions timings should not be compared directly to each other because the hardware and environment are different. The OCaml comparison below uses the GitHub Actions run only, so both Draton and OCaml were measured on the same machine class.

Local scorecard summary

Synthetic runtime scenarios from docs/benchmarks/gc-scorecard-local-2026-03-17-d3523f5.json:

ScenarioIterationselapsed_nsminor_cyclesmajor_cyclesmajor_slicesNotes
young-burst200007284754726young alloc fast path
promotion-chain4000850788514429survivor promotion pressure
barrier-churn1600022105674426write_barrier_slow_calls=3, remembered_set_entries_added=3
old-reuse-churn4096772054196631old-gen reuse / coalescing
large-object-burst2566853464226large-object free-pool reuse

Toolchain-facing workloads from the same local scorecard:

WorkloadStatusbuild_elapsed_nsrun_elapsed_nsExtra
gc_stress_linked_listok187480222331998675exit code 50
selfhost_bootstrapblocked99588654393-LLVM ERROR: unknown special variable

GitHub Actions scorecard summary

Synthetic runtime scenarios from docs/benchmarks/gc-scorecard-gha-2026-03-17-run-23203853670.json:

ScenarioIterationselapsed_nsminor_cyclesmajor_cyclesmajor_slicesNotes
young-burst200003387232726current_gc_threshold_milli=740
promotion-chain4000286682184423major_background_slices=1
barrier-churn160009783746426write_barrier_slow_calls=3, remembered_set_entries_added=3
old-reuse-churn4096477908436629old-gen free-run reuse
large-object-burst2564402338239large_free_pool_count=256

Toolchain-facing workloads from the same GitHub Actions scorecard:

WorkloadStatusbuild_elapsed_nsrun_elapsed_nsExtra
gc_stress_linked_listok173662158841797229exit code 50
selfhost_bootstrapblocked79215572831-LLVM ERROR: unknown special variable

GitHub Actions OCaml comparison

Source: docs/benchmarks/gc-ocaml-compare-gha-2026-03-17-run-23203853670.json

Top-level comparison result:

  • status: ok
  • scorecard_result: mixed
  • draton_wins: 0
  • scenario_count: 3
  • geometric_mean_ocaml_over_draton_median_speed_ratio: 0.21003585197381644

Interpretation:

  • A ratio below 1.0 means OCaml's median time was lower than Draton's median time.
  • The current published result means Draton is still slower on all three OCaml microbench scenarios in this run.

Per-scenario median results:

ScenarioDraton median nsOCaml median nsocaml_over_draton_median_speed_ratioResult
young-burst7229043750320.5187853435587575Draton slower
promotion-chain27510231320830.04801232123468251Draton much slower
barrier-churn10619943950590.3719973935822613Draton slower

What changed before these numbers

These results include the recent GC/runtime/codegen changes already on main:

  • skipped null write barriers in generated code
  • reduced young fast-path near-full bookkeeping
  • skipped shadow-stack and old-field fixups when minor GC had no young forwarding map
  • deduplicated consecutive remembered-set parent inserts

Those changes improved the benchmark path enough to produce cleaner numbers, but they did not yet make Draton faster than OCaml on the shared microbench set.

Current blockers and honesty notes

  • selfhost_bootstrap remains blocked in the published scorecards because the current self-host path still trips LLVM ERROR: unknown special variable.
  • The published OCaml compare is not blocked anymore; it is running and producing real numbers.
  • The repository is intentionally publishing both the local scorecard and the GitHub Actions compare output, including unfavorable results.

Reproduction

Local scorecard:

python3 tools/gc_scorecard.py --out build/gc-scorecard.json

OCaml comparison on a machine with ocamlopt available:

python3 tools/gc_compare_ocaml.py --out build/gc-ocaml-compare.json

GitHub Actions:

gh workflow run gc-perf.yml --ref main