Skip to content
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

Speed up make_simplified_union, fix recursive tuple crash #15128

Merged
merged 8 commits into from
May 6, 2023

Commits on Apr 25, 2023

  1. Speed up make_simplified_union, remove a potential crash

    The following code optimises make_simplified_union in the common case
    that there are exact duplicates in the union. In this regard, this is
    similar to python#15104
    
    To get this to work, I needed to use partial tuple fallbacks in a couple
    places (these maybe had the potential to be latent crashes anyway?)
    There were some interesting things going on with recursive type aliases
    and type state assumptions
    
    This is about a 25% speedup on the pydantic codebase and about a 2%
    speedup on self check (measured with uncompiled mypy)
    hauntsaninja committed Apr 25, 2023
    Configuration menu
    Copy the full SHA
    184e415 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    cd5f40b View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    13c4007 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    b009483 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    bea67d2 View commit details
    Browse the repository at this point in the history
  6. more perf

    hauntsaninja committed Apr 25, 2023
    Configuration menu
    Copy the full SHA
    fd8463b View commit details
    Browse the repository at this point in the history

Commits on May 5, 2023

  1. Configuration menu
    Copy the full SHA
    b132663 View commit details
    Browse the repository at this point in the history
  2. micro optimisations

    hauntsaninja committed May 5, 2023
    Configuration menu
    Copy the full SHA
    bc79133 View commit details
    Browse the repository at this point in the history