Repository navigation
Compare compiled startup with Python invocations - #1268
Merged
Merged
Conversation
compile_bench can now time a matching python3 -c invocation beside the compiled program run stage. With --python-code, each JSON row records the Python minimum and a Flow/Python startup ratio. Refs #746
This was referenced Oct 4, 2026
Keep --python-code on compile_bench alongside --host/--compiler and the compile-to-result profile fields that landed on main. Co-authored-by: Abhishek Shivakumar <[email protected]>
Probe-link without optional Python/GPU/OpenSSL load commands when the program reaches none of their symbols, so hello-world binaries no longer pay for those dylibs at exec time. FLOW_NO_LINK_TRIM=1 and sanitizer builds keep the full link. compile_bench --python-code records python_ms / run_vs_python_x100 next to run_ms and bin_bytes. Tests cover the argument error, the lean link, and generated C with no constructors. Part of #746 Co-authored-by: Abhishek Shivakumar <[email protected]>
This was referenced Oct 5, 2026
Init the #740 profiler lazily on the first routed allocation so a program that never allocates pays no constructor before main. Part of #746 Co-authored-by: Abhishek Shivakumar <[email protected]>
8 tasks done
Co-authored-by: Abhishek Shivakumar <[email protected]>
Co-authored-by: Abhishek Shivakumar <[email protected]>
compiler/bootstrap: took main's, then bootstrap_from_c.sh --regen (fixed point at gen2 on macOS and Linux x86-64); checked-in flowc_stage_a rebuilt for Linux x86-64 like main's. docs/project/CHANGELOG.md: kept main's entries and this branch's.
Only docs/project/CHANGELOG.md conflicted (after #1357); kept both.
Bring #1350 compile-profile changes onto the cold-start compare branch, restore --python-code / python_ms emission lost in the merge, and regen bootstrap (Linux x86-64 ELF) to the fixed point.
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
--python-code CODEtocompile_bench.python3 -c CODEinvocation with the same repetition count.python_msandrun_vs_python_x100beside the existingrun_msfield.Test plan
./flow tool compile_bench --repeat 3 --python-code 'print("Hello, world!")' examples/basics/hello_world.flow./flow tool compile_bench --python-codeexits 2 with a clear argument errorLocal result
{"program": "examples/basics/hello_world.flow", "loc": 6, "emit_ms": 6, "cc_ms": 55, "run_ms": 104, "total_ms": 165, "python_ms": 11, "run_vs_python_x100": 945, "reps": 3, "loc_per_emit_s": 1000}Refs #746