FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

gh-89536: Use ThinLTO policy if possible by corona10 · Pull Request #96766 · python/cpython · GitHub

Repository navigation

gh-89536: Use ThinLTO policy if possible - #96766

Merged
corona10 merged 2 commits into
python:mainfrom
corona10:gh-89536
Sep 16, 2022
Merged

corona10 merged 2 commits into
python:mainfrom
corona10:gh-89536

Conversation

corona10 commented Sep 12, 2022 •
edited
Loading

Copy link
Copy Markdown
Member
  • Build time with the --with-lto flag (AS-IS: LTO): 112.02 secs
  • Build time with the --with-lto flag (TO-BE: ThinLTO): 56.150 secs (almost 2x faster)

Both builds were done with M1 Pro CPU

Copy link
Copy Markdown
Member Author

cc @matthiasgoergens

corona10 requested a review from tiran September 12, 2022 09:56

corona10 commented Sep 12, 2022 •
edited
Loading

Copy link
Copy Markdown
Member Author

I will wait for @ned-deily 's review as the final reviewer since he is the expert on macOS releases.

corona10 changed the title gh-89536: Use thinLTO policy if possible gh-89536: Use ThinLTO policy if possible Sep 12, 2022

Copy link
Copy Markdown
Contributor

Should we do a performance benchmark of the generated executable?

corona10 commented Sep 12, 2022 •
edited
Loading

Copy link
Copy Markdown
Member Author

@matthiasgoergens
My last attempt did not give a significant impact but it was measured by VM, checking the benchmark result at this moment would be valuable.
#88506 (comment)

Copy link
Copy Markdown
Contributor

Thanks!

Ha, I should learn how this pyperformance module works for my own experiments. Thanks for linking to that comment.

corona10 commented Sep 12, 2022 •
edited
Loading

Copy link
Copy Markdown
Member Author

@ned-deily @methane cc @matthiasgoergens

https://gist.github.com/corona10/40d48caebb498ade456d2332c4fa430e

Here is the latest benchmark with my local macOS environment(not fully isolated) when applying only LTO optimization.

corona10 commented Sep 12, 2022 •
edited
Loading

Copy link
Copy Markdown
Member Author

Here is the PGO + LTO benchmark (consistently 3-4% faster :))

https://gist.github.com/corona10/60d73e610f14661e131ed9037eab4d38

ronaldoussoren left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

LGTM

corona10 merged commit e47b96c into python:main Sep 16, 2022
corona10 deleted the gh-89536 branch September 16, 2022 10:40

Copy link
Copy Markdown
Member Author

Thank you @ronaldoussoren and @methane

This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants


Back | FazBrowse Home | New Git URL