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

[mypyc] Optimize classmethod calls via cls #14789

Merged
merged 6 commits into from
Mar 2, 2023
Merged

[mypyc] Optimize classmethod calls via cls #14789

merged 6 commits into from
Mar 2, 2023

Commits on Feb 26, 2023

  1. Keep track of cls arguments

    JukkaL committed Feb 26, 2023
    Configuration menu
    Copy the full SHA
    53f8915 View commit details
    Browse the repository at this point in the history
  2. [mypyc] Optimize classmethod calls via cls

    If the class has no subclasses, we can statically bind the call target.
    
    For this to be safe, also reject assignments to the "cls" argument in
    classmethods in compiled code.
    
    This makes the deltablue benchmark about 11% faster.
    JukkaL committed Feb 26, 2023
    Configuration menu
    Copy the full SHA
    4f6a6c8 View commit details
    Browse the repository at this point in the history
  3. Fix cls attribute

    JukkaL committed Feb 26, 2023
    Configuration menu
    Copy the full SHA
    8b77baf View commit details
    Browse the repository at this point in the history
  4. Add some run tests

    JukkaL committed Feb 26, 2023
    Configuration menu
    Copy the full SHA
    70fa58e View commit details
    Browse the repository at this point in the history
  5. Fix interpreted subclasses

    JukkaL committed Feb 26, 2023
    Configuration menu
    Copy the full SHA
    f877394 View commit details
    Browse the repository at this point in the history
  6. Minor code and test tweaks

    JukkaL committed Feb 26, 2023
    Configuration menu
    Copy the full SHA
    070f1c3 View commit details
    Browse the repository at this point in the history