Skip to content

Consider adding test_type_aliases and test_type_params to PGO suite #110282

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

Open
sobolevn opened this issue Oct 3, 2023 · 3 comments
Open

Consider adding test_type_aliases and test_type_params to PGO suite #110282

sobolevn opened this issue Oct 3, 2023 · 3 comments
Assignees
Labels
build The build process and cross-build tests Tests in the Lib/test dir type-feature A feature request or enhancement

Comments

@sobolevn
Copy link
Member

sobolevn commented Oct 3, 2023

Feature or enhancement

After #110277 I thought that there are several new modules that excercise some new C modules / types:

  • test_type_params
  • test_type_aliases

I believe that these test are quite important, because they basically cover some parts of python grammar. So, should I add them to the pgo suite?

CC @vstinner

@sobolevn sobolevn added type-feature A feature request or enhancement tests Tests in the Lib/test dir labels Oct 3, 2023
@sobolevn sobolevn self-assigned this Oct 3, 2023
@sobolevn sobolevn changed the title Consider adding `test_ Consider adding test_type_aliases and test_type_params to PGO suite Oct 3, 2023
@sobolevn
Copy link
Member Author

sobolevn commented Oct 3, 2023

And maybe even test_typing?

@AlexWaygood AlexWaygood added the build The build process and cross-build label Oct 3, 2023
@vstinner
Copy link
Member

vstinner commented Oct 3, 2023

CC @vstinner

I'm not the right person to ask about performance and trying PGO build.

@gvanrossum: Any idea if something should be done to optimize Python performance for the typing module?

@JelleZijlstra
Copy link
Member

I don't have good intuition on what should and should not be added to the PGO build, but here's some thoughts:

  • On the plus side, these tests are really fast (I just ran test_type_params in 198 ms, test_type_aliases in 76 ms, and test_typing in 677 ms). So if we add them, the cost is low in terms of slowing down the PGO build.
  • On the negative side, I'm not sure it helps us all that much. The code paths exercised by these typing tests generally shouldn't be hot at runtime (you only execute your type annotations once), so having PGO focus on it doesn't seem all that helpful.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
build The build process and cross-build tests Tests in the Lib/test dir type-feature A feature request or enhancement
Projects
None yet
Development

No branches or pull requests

4 participants