Skip to content

Tier 2 optimizations for 3.13 #115419

@markshannon

Description

@markshannon
Member

Feature or enhancement

Prerequisites

Optimizations to be added to the tier 2 optimizer for 3.13

If we have time:

  • Replace CALL_TUPLE_1 for list and generator arguments
    Only specialize CALL in tier for type. Generate optimal argument handling code in tier 2.

Linked PRs

Activity

mdboom

mdboom commented on Feb 13, 2024

@mdboom
Contributor

This is perhaps so rough as to be meaningless (i.e. uop counts != run time), but in an attempt to help prioritize these tasks, I thought I'd share some aggregate counts from a recent pyperformance run:

Grouping Uops included in group Total
TO_BOOL TO_BOOL_ALWAYS_TRUE, TO_BOOL_BOOL, TO_BOOL_INT, TO_BOOL_LIST, TO_BOOL_NONE, TO_BOOL_STR, _TO_BOOL 1,296,284,467
LOAD_ATTR_MODULE 96,542,580
BINARY_OP _BINARY_OP_MULTIPLY_INT, _BINARY_OP_ADD_INT, _BINARY_OP_SUBTRACT_INT, _BINARY_OP_ADD_UNICODE, _BINARY_OP, _BINARY_OP_MULTIPLY_FLOAT, _BINARY_OP_ADD_FLOAT, _BINARY_OP_SUBTRACT_FLOAT 5,308,844,150
COMPARE_OP COMPARE_OP_INT, COMPARE_OP_STR, _COMPARE_OP, COMPARE_OP_FLOAT 2,404,431,292
CONTAINS_OP 1,654,609,694

@markshannon: Let me know if anything else like this would be helpful.

Fidget-Spinner

Fidget-Spinner commented on Feb 14, 2024

@Fidget-Spinner
Member

I am assigning myself all binary op related stuff. Since it is relatively straightforward.

added a commit that references this issue on Mar 13, 2024
617aca9
added a commit that references this issue on Mar 20, 2024
added a commit that references this issue on Mar 25, 2024
added a commit that references this issue on Apr 17, 2024
added a commit that references this issue on Apr 18, 2024
added a commit that references this issue on Apr 19, 2024
added a commit that references this issue on Apr 24, 2024
markshannon

markshannon commented on Aug 15, 2024

@markshannon
MemberAuthor

3.13 is nearing release, so nothing more is going in 3.13.

Everything we didn't get done for 3.13 will get into 3.14 (if it hasn't been done already)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    interpreter-core(Objects, Python, Grammar, and Parser dirs)performancePerformance or resource usagetype-featureA feature request or enhancement

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      No branches or pull requests

        Participants

        @mdboom@markshannon@Fidget-Spinner@Eclips4

        Issue actions

          Tier 2 optimizations for 3.13 · Issue #115419 · python/cpython