[-- Attachment #1: Type: text/plain, Size: 387 bytes --] New issue by travankor on void-packages repository https://github.com/void-linux/void-packages/issues/29526 Description: [PGO optimization](https://codeberg.org/dnkl/foot/src/branch/master/doc/benchmark.md) speed foot up by a significant amount. Add a build option that [enables PGO ](https://codeberg.org/dnkl/foot/src/branch/master/INSTALL.md#user-content-partial-pgo) during build.
[-- Attachment #1: Type: text/plain, Size: 224 bytes --] New comment by ericonr on void-packages repository https://github.com/void-linux/void-packages/issues/29526#issuecomment-828031140 Comment: Definitely not on by default, since PGO is affected by the CPU that's being used.
[-- Attachment #1: Type: text/plain, Size: 1123 bytes --] New comment by dnkl on void-packages repository https://github.com/void-linux/void-packages/issues/29526#issuecomment-872740075 Comment: > since PGO is affected by the CPU that's being used. It's actually not. PGO counts functions and branches executed, and helps re-organize the code; it clusters "hot" functions, to improve cache locality. It can also re-arrange code within a function to make the "normal" path the fast path (i.e. placing the not-often executed branches at e.g. the end of the function). But PGO in itself does not emit CPU specific instructions, nor does it depend on CPU-specific knowledge for e.g. instruction scheduling. Over at nix, @sternenseemann has been able to do reproducable PGO builds. That is, builds on different systems produce identical output. I can't for my life find the issue, or comment, where I saw this, but pretty sure sterni can fill in the details, if needed. Oh, and as a bonus, PGO builds tend to be smaller (in binary size) than regular release builds. This is _at least_ true for LTO builds (which I strongly recommend building foot with, with or without PGO).
[-- Attachment #1: Type: text/plain, Size: 842 bytes --] New comment by sternenseemann on void-packages repository https://github.com/void-linux/void-packages/issues/29526#issuecomment-872803985 Comment: I can configure that building foot with PGO can be reproducible, i. e. I can reproduce the exact hash of the binary package produced by our builders on two different local machines (at different times). This also leads me to [believe that a reproducible gcc with PGO is possible](https://github.com/NixOS/nixpkgs/pull/112928#issuecomment-809336063), but most likely very hard to get to work. The only thing necessary to achieve a reproducible foot build is generating the random inputs which are used for profiling while building using a [fixed seed](https://github.com/NixOS/nixpkgs/blob/43b257365c2c73fc31421e9b28dde1166d75506a/pkgs/applications/terminal-emulators/foot/default.nix#L62).
[-- Attachment #1: Type: text/plain, Size: 840 bytes --] New comment by sternenseemann on void-packages repository https://github.com/void-linux/void-packages/issues/29526#issuecomment-872803985 Comment: I can confirm that building foot with PGO can be reproducible, i. e. I can reproduce the exact hash of the binary package produced by our builders on two different local machines (at different times). This also leads me to [believe that a reproducible gcc with PGO is possible](https://github.com/NixOS/nixpkgs/pull/112928#issuecomment-809336063), but most likely very hard to get to work. The only thing necessary to achieve a reproducible foot build is generating the random inputs which are used for profiling while building using a [fixed seed](https://github.com/NixOS/nixpkgs/blob/43b257365c2c73fc31421e9b28dde1166d75506a/pkgs/applications/terminal-emulators/foot/default.nix#L62).
[-- Attachment #1: Type: text/plain, Size: 293 bytes --] New comment by github-actions[bot] on void-packages repository https://github.com/void-linux/void-packages/issues/29526#issuecomment-1120562442 Comment: Issues become stale 90 days after last activity and are closed 14 days after that. If this issue is still relevant bump it or assign it.
[-- Attachment #1: Type: text/plain, Size: 254 bytes --] New comment by ericonr on void-packages repository https://github.com/void-linux/void-packages/issues/29526#issuecomment-1121827542 Comment: Not stale. @ifreund do you have anything in effect for this? I think I had a branch attempting it a while back
[-- Attachment #1: Type: text/plain, Size: 197 bytes --] New comment by ifreund on void-packages repository https://github.com/void-linux/void-packages/issues/29526#issuecomment-1122249554 Comment: @ericonr nope, I haven't tried to implement this yet.
[-- Attachment #1: Type: text/plain, Size: 293 bytes --] New comment by github-actions[bot] on void-packages repository https://github.com/void-linux/void-packages/issues/29526#issuecomment-1208832543 Comment: Issues become stale 90 days after last activity and are closed 14 days after that. If this issue is still relevant bump it or assign it.
[-- Attachment #1: Type: text/plain, Size: 390 bytes --] Closed issue by travankor on void-packages repository https://github.com/void-linux/void-packages/issues/29526 Description: [PGO optimization](https://codeberg.org/dnkl/foot/src/branch/master/doc/benchmark.md) speed foot up by a significant amount. Add a build option that [enables PGO ](https://codeberg.org/dnkl/foot/src/branch/master/INSTALL.md#user-content-partial-pgo) during build.