<story><title>How Rust 1.64 became faster on Windows</title><url>https://tomaszs2.medium.com/how-rust-1-64-became-10-20-faster-on-windows-3a8bb5e81d70</url></story><parent_chain><item><author>londons_explore</author><text>Unfortunately, many projects never benefit from PGO, because there is quite a lot of complexity involved in setting up a profiling workload, storing the profile somewhere, and using it for future builds.&lt;p&gt;I&amp;#x27;d like compiler writers to embed a &amp;#x27;default profile&amp;#x27; into the compiler, which uses data from as much opensource code as they can find all over github etc.&lt;p&gt;This default profile will improve the performance of lots of libraries that everyone uses, and will probably still help closed source code (since it will probably be written in a similar style to opensource code).</text></item><item><author>wongarsu</author><text>Great to see how huge the benefit of profile-guided optimization is. I feel it&amp;#x27;s one of the more underappreciated techniques. Rust adding support for it on windows, and showcasing what a big improvement it makes on the compiler is pretty big (in addition to just having a faster compiler)</text></item></parent_chain><comment><author>andrewaylett</author><text>The &amp;quot;default&amp;quot; profile &amp;quot;for PGO&amp;quot; is the compiler on its own -- folk put a &lt;i&gt;lot&lt;/i&gt; of effort into making sure it will generally compile arbitrary code well.  And a big part of that is lots of people running lots of open source code and measuring how well it performs.&lt;p&gt;The difficulty with &amp;quot;as much open source code as they can find&amp;quot; is that we need to execute the code to make a profile.  And unless we&amp;#x27;re running the code under real-world conditions, there&amp;#x27;s no guarantee that we&amp;#x27;ll generate a useful profile.  So we need to be a little careful about which code we look at from a performance perspective.  Even when we have a profile, it&amp;#x27;s a count of branches taken for the specific code that was compiled, and it&amp;#x27;s not normally applicable to either a different version of the compiler or any input that&amp;#x27;s not identical to the input used for profiling.  With link-time optimisations, even a &amp;quot;common&amp;quot; profile for library code isn&amp;#x27;t necessarily going to be useful: which bits of a library we&amp;#x27;ll try to inline will vary according to the code that&amp;#x27;s calling it.</text></comment>
<story><title>How Rust 1.64 became faster on Windows</title><url>https://tomaszs2.medium.com/how-rust-1-64-became-10-20-faster-on-windows-3a8bb5e81d70</url></story><parent_chain><item><author>londons_explore</author><text>Unfortunately, many projects never benefit from PGO, because there is quite a lot of complexity involved in setting up a profiling workload, storing the profile somewhere, and using it for future builds.&lt;p&gt;I&amp;#x27;d like compiler writers to embed a &amp;#x27;default profile&amp;#x27; into the compiler, which uses data from as much opensource code as they can find all over github etc.&lt;p&gt;This default profile will improve the performance of lots of libraries that everyone uses, and will probably still help closed source code (since it will probably be written in a similar style to opensource code).</text></item><item><author>wongarsu</author><text>Great to see how huge the benefit of profile-guided optimization is. I feel it&amp;#x27;s one of the more underappreciated techniques. Rust adding support for it on windows, and showcasing what a big improvement it makes on the compiler is pretty big (in addition to just having a faster compiler)</text></item></parent_chain><comment><author>bruce343434</author><text>&amp;gt; I&amp;#x27;d like compiler writers to embed a &amp;#x27;default profile&amp;#x27; into the compiler, which uses data from as much opensource code as they can find all over github etc.&lt;p&gt;What would be the point? The whole thing about PGO is that it measures which paths of _your_ code are &amp;quot;hot&amp;quot;.</text></comment>