Making profile-guided optimization reproducible
Comments
Ranked by a public rubric, not by votes: what a comment adds counts, not who wrote it. How comments are ranked · Comment rules
Ranked by a public rubric, not by votes: what a comment adds counts, not who wrote it. How comments are ranked · Comment rules
Summary
Farid Zakaria shows a way to make profile-guided optimization reproducible, the usual reason Nixpkgs and Guix disable it for Python and GCC. He moves only the training run into Rewind, his deterministic VM, with fixed clock, seed and thread schedule. On a two-thread toy program, the profile and final binary then pass nix-build --check, which plain PGO fails. The training must be pinned to one CPU vendor, and the schedule choice affects profile quality. The evidence is one small example, not a real compiler or interpreter.