Skip to content

Consider adding test_type_aliases and test_type_params to PGO suite #110282

Open

Description

@sobolevn

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

Activity

  1. added
    type-featureA feature request or enhancement
    testsTests in the Lib/test dir
    on Oct 3, 2023
  2. self-assigned this
    on Oct 3, 2023
  3. changed the title [-]Consider adding `test_[/-] [+]Consider adding `test_type_aliases` and `test_type_params` to PGO suite[/+] on Oct 3, 2023
  4. sobolevn commented on Oct 3, 2023

    @sobolevn
    MemberAuthor

    And maybe even test_typing?

  5. vstinner commented on Oct 3, 2023

    @vstinner
    Member

    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?

  6. JelleZijlstra commented on Oct 3, 2023

    @JelleZijlstra
    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

Metadata

Metadata

Assignees

Labels

buildThe build process and cross-buildtestsTests in the Lib/test dirtype-featureA feature request or enhancement

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions