Skip to content

Significant performance degradation in the macOS build #122832

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
rhettinger opened this issue Aug 8, 2024 · 8 comments
Closed

Significant performance degradation in the macOS build #122832

rhettinger opened this issue Aug 8, 2024 · 8 comments
Assignees
Labels
OS-mac performance Performance or resource usage

Comments

@rhettinger
Copy link
Contributor

rhettinger commented Aug 8, 2024

Bug report

Bug description:

The benchmark at Tools/scripts/var_access_benchmark.py indicates that something is wrong with the latest build.

The versions compared are 3.12.4 versus Python 3.13.0rc1 using the stock macOS 64-bit universal2 installer builds published on python.org.

Screenshot 2024-08-08 at 12 28 26 PM

CPython versions tested on:

3.13

Operating systems tested on:

macOS

@rhettinger rhettinger added the type-bug An unexpected behavior, bug, or error label Aug 8, 2024
@rhettinger rhettinger added performance Performance or resource usage and removed type-bug An unexpected behavior, bug, or error labels Aug 8, 2024
@hugovk
Copy link
Member

hugovk commented Aug 8, 2024

Sound like a duplicate of #122580.

@rhettinger
Copy link
Contributor Author

Sound like a duplicate of #122580.

There are key differences.

The other report shows a specific piece of code that runs a little slower and could reasonably be attributed to a skipped PGO path or build noise. This report shows degradation across the board. Local variable reads are 4x slower. This isn't minor.

The other report used a local build which would be affected by many factors. This report uses the official python.org builds.

The other report used an alpha version. This report focuses on a release-candidate which means that this is what we're about to ship. That makes the level of severity more important.

Rather than thinking about dismissing this as a duplicate, a better question is whether it should be marked as a release-blocker.

@ned-deily
Copy link
Member

ned-deily commented Aug 8, 2024

Thanks for the additional data points. I think we were considering the other issue to be a release blocker and should have labeled it as such.

@hugovk
Copy link
Member

hugovk commented Aug 8, 2024

The full pyperformance suite has been run in the other issue, comparing 3.13.0rc1 and 3.12.4 and showed the RC is some 9% slower. See #122580 (comment)

Yes, I think it's a release blocker. There's a possible solution in the other issue, building with different flags.

@ned-deily
Copy link
Member

BTW, thanks again, @rhettinger, for implementing that useful benchmark. I had been using it already in investigating the other report which was also against the python.org builds, later diverging into local test builds.

@ned-deily ned-deily self-assigned this Aug 8, 2024
@hg0428
Copy link

hg0428 commented Aug 9, 2024

Sound like a duplicate of #122580.

There are key differences.

The other report shows a specific piece of code that runs a little slower and could reasonably be attributed to a skipped PGO path or build noise. This report shows degradation across the board. Local variable reads are 4x slower. This isn't minor.

The other report used a local build which would be affected by many factors. This report uses the official python.org builds.

The other report used an alpha version. This report focuses on a release-candidate which means that this is what we're about to ship. That makes the level of severity more important.

Rather than thinking about dismissing this as a duplicate, a better question is whether it should be marked as a release-blocker.

Sound like a duplicate of #122580.

There are key differences.

The other report shows a specific piece of code that runs a little slower and could reasonably be attributed to a skipped PGO path or build noise. This report shows degradation across the board. Local variable reads are 4x slower. This isn't minor.

The other report used a local build which would be affected by many factors. This report uses the official python.org builds.

The other report used an alpha version. This report focuses on a release-candidate which means that this is what we're about to ship. That makes the level of severity more important.

Rather than thinking about dismissing this as a duplicate, a better question is whether it should be marked as a release-blocker.

Actually, my report used the official installers from Python.org, and focused on the release candidate as well. So, they can be seen as the same overall issue. Thanks for the benchmark to help this out.

@ned-deily
Copy link
Member

Thanks again for the extremely useful data and the heads-up. Since the performance degradation here appears to the same root cause and solution (which will be available in 3.13.0rc2) as that noted in #122580, I am going to close this as a duplicate and consolidate the discussion there.

@ned-deily ned-deily closed this as not planned Won't fix, can't repro, duplicate, stale Sep 3, 2024
@rhettinger
Copy link
Contributor Author

Just tested 3.13rc2 and everything is fixed. Thank you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
OS-mac performance Performance or resource usage
Projects
Development

No branches or pull requests

5 participants