Open and answer this issue on GitHub.
compiler, ready, future · opened 2026-11-04 · updated 2026-11-04 · 0 comments
Profile our own compiler, make it faster where the measurement points, and let the parts written in Nikaia use more than one core.
This is not needed for the current focus. It is filed now so the plan is not lost, and labelled future.
Almost all parallel work in the toolchain today is in the Rust driver:
lower-std lowers one file per thread (in_parallel in crates/nikaia/src/sysroot.rs, NIKAIA_LOWER_THREADS).nikaia test runs test programs side by side (run_program_tests in crates/nikaia/src/project.rs).The compiler’s own Nikaia (crates/nikaia-std/src/tools/*.nika) runs on one core. Nobody has yet measured how a build splits between our code and rustc, so it is open whether parallelising our part would be noticeable at all.
par_iter, keeps it sequential. It needs a redesign: each function produces its own result (errors, facts, cache entries), and the results are merged afterwards in a fixed order, so the error output stays deterministic.docs/measuring.md says (counted instructions, never time): one build of examples/ and one lower-std, split per phase (parse, check, prove, emit, rustc). The result goes into a note under docs/.rustc dominates, the gain lies in emitting less or simpler Rust, not in parallel checking.Each step is measured before and after; a step that does not pay is reverted, not kept.
Generated by Claude Code