Repository navigation
tools: compile_bench, a compile-to-result timer - #1159
Merged
Merged
Conversation
Measures the three externally visible stages of a Flow compile -- flowc emit, cc -O2, program run -- as minimum-of-N JSON lines with source LOC per emit second. Stock programs cover tiny (hello_world), small (fibonacci) and large (compiler/src/main.flow bundle). The in-compiler phase split (parse, resolve, typecheck, mono, emit) still needs instrumentation inside compiler/src; this gives the #727 tracked dimension and a harness to feed it.
godofecht
force-pushed
the
devin/compile-bench
branch
from
October 1, 2026 21:36
0ee53d4 to
7c23365
Compare
7 of 8 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
A
flowtool that measures the externally visible stages of a compile as processes and reports minimum-of-N timings as JSON (#735):emit_ms(Stage-A flowc via the bootstrap binary),cc_ms(C toolchain),run_ms(compiled program launch, lenient: a nonzero exit still counts),total_mscompile-to-result.--repeat Nand extra program paths are accepted.compiler/bootstrap/flowc_stage_a.ccompiled tobuild/compile_bench/flowc_bootstrap, rebuilt when missing or older than the C.std.process; no new scripts.This covers the compile-to-result dimension of #727 and is the harness the in-compiler phase timers (#735 remainder) will feed. The parse / resolve / typecheck / mono split still needs instrumentation inside
compiler/src, left out deliberately because those files have other work in flight.Test plan
./flow tool compile_bench --repeat 3produces three JSON lines, exit 0--repeathandled; missing files report and exit 1