GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Specialize COMPARE_OP · Issue #90043 · python/cpython

Specialize COMPARE_OP #90043

New issue
Copy link
New issue
Copy link
Closed
Closed
Specialize COMPARE_OP#90043
Copy link
Labels
3.11only security fixesonly security fixesinterpreter-core(Objects, Python, Grammar, and Parser dirs)(Objects, Python, Grammar, and Parser dirs)performancePerformance or resource usagePerformance or resource usage

Description

@sweeneyde
sweeneyde
opened on Nov 23, 2021
Issue body actions
BPO 45885
Nosy @markshannon, @brandtbucher, @sweeneyde
PRs
  • bpo-45885: Specialize COMPARE_OP #29734
  • bpo-45885: Add more stats for COMPARE_OP in specialize.c #31040
  • bpo-45885: Don't un-adapt COMPARE_OP when collecting stats #31516
  • Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.

    Show more details

    GitHub fields:

    assignee = None
    closed_at = <Date 2021-12-03.23:45:56.141>
    created_at = <Date 2021-11-23.21:00:24.137>
    labels = ['interpreter-core', '3.11', 'performance']
    title = 'Specialize COMPARE_OP'
    updated_at = <Date 2022-02-23.11:06:35.684>
    user = 'https://github.com/sweeneyde'

    bugs.python.org fields:

    activity = <Date 2022-02-23.11:06:35.684>
    actor = 'Mark.Shannon'
    assignee = 'none'
    closed = True
    closed_date = <Date 2021-12-03.23:45:56.141>
    closer = 'Dennis Sweeney'
    components = ['Interpreter Core']
    creation = <Date 2021-11-23.21:00:24.137>
    creator = 'Dennis Sweeney'
    dependencies = []
    files = []
    hgrepos = []
    issue_num = 45885
    keywords = ['patch']
    message_count = 5.0
    messages = ['406887', '406930', '407577', '412441', '413784']
    nosy_count = 3.0
    nosy_names = ['Mark.Shannon', 'brandtbucher', 'Dennis Sweeney']
    pr_nums = ['29734', '31040', '31516']
    priority = 'normal'
    resolution = 'fixed'
    stage = 'resolved'
    status = 'closed'
    superseder = None
    type = 'performance'
    url = 'https://bugs.python.org/issue45885'
    versions = ['Python 3.11']

    Linked PRs

    • GH-90043: Handle NaNs in COMPARE_OP_FLOAT_JUMP #100278

    Activity

    1. sweeneyde commented on Nov 23, 2021

      @sweeneyde
      sweeneyde
      on Nov 23, 2021
      MemberAuthor
      More actions

      Some specialization statistics:

      https://gist.github.com/sweeneyde/49cc3a9d074d56cf095cb0a42d13d7a4

      Including 3 opcodes: COMPARE_OP_INT and COMPARE_OP_FLOAT and COMPARE_OP_STR (equality only) seems to give pretty good specialization numbers, better than just 2.

    2. sweeneyde
      added
      3.11only security fixesonly security fixes
      interpreter-core(Objects, Python, Grammar, and Parser dirs)(Objects, Python, Grammar, and Parser dirs)
      performancePerformance or resource usagePerformance or resource usage
      on Nov 23, 2021
    3. markshannon commented on Nov 24, 2021

      @markshannon
      markshannon
      on Nov 24, 2021
      Member
      More actions

      Is COMPARE_OP worth specializing by itself?

      Most comparisons are followed by a jump, and much of the overhead is in the branching around the choice of operator as well as pushing and popping (with inc/decrefs) a value that has only one bit of information (True/False).

    4. markshannon commented on Dec 3, 2021

      @markshannon
      markshannon
      on Dec 3, 2021
      Member
      More actions

      New changeset 03768c4 by Dennis Sweeney in branch 'main':
      bpo-45885: Specialize COMPARE_OP (GH-29734)
      03768c4

    5. sweeneyde
      closed this as completedon Dec 3, 2021
    6. sweeneyde
      closed this as completedon Dec 3, 2021
    7. markshannon commented on Feb 3, 2022

      @markshannon
      markshannon
      on Feb 3, 2022
      Member
      More actions

      New changeset 674ab66 by Dennis Sweeney in branch 'main':
      bpo-45885: Add more stats for COMPARE_OP in specialize.c (GH-31040)
      674ab66

    8. markshannon commented on Feb 23, 2022

      @markshannon
      markshannon
      on Feb 23, 2022
      Member
      More actions

      New changeset 375a56b by Brandt Bucher in branch 'main':
      bpo-45885: Don't un-adapt COMPARE_OP when collecting stats (GH-31516)
      375a56b

    9. ezio-melotti
      transferred this issue fromon Apr 10, 2022
    10. brandtbucher
      added a commit that references this issue on Dec 16, 2022

      GH-90043: Handle NaNs in COMPARE_OP_FLOAT_JUMP (GH-100278)

      9076455
    11. carljm
      added a commit that references this issue on Dec 16, 2022

      Merge branch 'main' into fastmock

      1b6241a
    12. shihai1991
      added a commit that references this issue on Dec 18, 2022

      Merge remote-tracking branch 'origin/main' into bpo_34697

      2878571
    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

      3.11only security fixesonly security fixesinterpreter-core(Objects, Python, Grammar, and Parser dirs)(Objects, Python, Grammar, and Parser dirs)performancePerformance or resource usagePerformance or resource usage

      Projects

      No projects

        Milestone

        No milestone

        Relationships

        None yet

        Development

        No branches or pull requests

        Issue actions

        You are visitor 01402503 — GeezerVison does not store the pages you look up.
        Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.