3 ms·
Profile-guided optimization seems huge. Does anyone have any numbers relating to the performance increase we can expect?
by nicolashahn 7y ago
Profile-guided optimization seems huge. Does anyone have any numbers relating to the performance increase we can expect?
- slovenlyrobot 7y agoThe effect is very dependent on program structure and actual code running, but for a suitable application it's reasonable to expect anything from 5-15%, and sometimes much more (see e.g. Firefox reporting 18% here: https://glandium.org/blog/?p=3888 https://glandium.org/blog/?p=3888 )
- angrygoat 7y agoI just gave it a whirl on one of my own programs, which runs the distribution of votes for Australian senate elections. In my particular case I didn't see a speedup (but it's a relatively simple program: perhaps the branching was already predictable enough.) It wasn't hard to try out, the docs are here (including using it via cargo): https://doc.rust-lang.org/rustc/profile-guided-optimization.html https://doc.rust-lang.org/rustc/profile-guided-optimization....