perf: parse the files of a program in parallel #206
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Goal
The parse is two thirds of a small build. The files of a program are independent: parse them in parallel with
std/paralleland hand the trees back in input order.Design record
PERFORMANCE.md 9.6 ("The parse, still"). Part of #144. Keeping the parsed
stdbetween runs is a different lever with public behaviour (cache location, invalidation); it is not part of this issue.Acceptance criteria
torb parse,checkandbuildproduce the same tokens, trees (torb tokens,torb astover every.trbfile of the repository) and C (tools/agree.sh emithashes) asmain; the order of diagnostics is unchanged.torb parse std compiler tests(830 files) is faster than onmainin the alternating-run comparison on the CI runner, and the small-build casetorb check tests/conformance/adts.trbis not slower. If the tree crossing back as a copy eats the gain, the PR is not opened and the numbers go into PERFORMANCE.md 9.7 as "measured and not taken".sh tools/gates.sh ais green in forge CI.Measurement
Measured in CI, no local bootstrap: the forge CI job for the PR runs
sh tools/gates.sh a; the before/after processor times come fromtorb check tests/conformance/adts.trb,torb build --emit-c tests/conformance/adts.trbandtorb build --emit-c ./compilerrun with themainbinary and the PR binary alternating (3 runs, mean, as in PERFORMANCE.md 9.5), printed in the CI log and copied into PERFORMANCE.md 9.7. CI machines are noisy, so the ratio of alternating runs counts, not absolute seconds. Note: the CI runner's core count bounds the gain; record the core count in the log.Seed impact
None expected (
std/parallelexists). The compiler itself is then built with the seed, so it may only use what the current seed'sstd/paralleloffers; if it does not, split off the seed step. One PR.[loop:torbscript] claim implement by session:loop-torbscript-20261008 until 2026-10-08T21:19Z
[loop:torbscript] release implement: the worker of the previous claim ended without a commit or a branch on the forge, so the claim is void; a new worker takes the issue below
[loop:torbscript] claim implement by session:loop-torbscript-20261008 until 2026-10-08T22:35Z
[loop:torbscript] implement: PR #214 (branch
loop/206-parallel-parse, head578a581b) is open: files of a program parse in parallel viastd/parallel, trees and diagnostics in input order. The worker session was killed before it read the forge CI result; CI on the PR is running. Red CI on the PR starts a fix round. Worker usage: not reported (session killed). next: waiting (forge CI on PR #214)[loop:torbscript] claim implement by session:loop-torbscript-20261008 until 2026-10-08T23:52Z