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 — Improve efficiency of PRECALL/CALL instructions · Issue #90690 · python/cpython

Improve efficiency of PRECALL/CALL instructions #90690

New issue
Copy link
New issue
Copy link
Closed
Closed
Improve efficiency of PRECALL/CALL instructions#90690
Copy link
Assignees
markshannon
Labels
performancePerformance or resource usagePerformance or resource usagetype-featureA feature request or enhancementA feature request or enhancement

Description

@markshannon
markshannon
opened on Jan 26, 2022
Issue body actions
BPO 46532
Nosy @markshannon
PRs
  • bpo-46532: Reduce number of memory writes to update call_shape.kwnames. #31231
  • 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 = 'https://github.com/markshannon'
    closed_at = None
    created_at = <Date 2022-01-26.09:44:42.979>
    labels = []
    title = 'Improve efficiency of PRECALL/CALL instructions'
    updated_at = <Date 2022-02-10.12:57:59.448>
    user = 'https://github.com/markshannon'

    bugs.python.org fields:

    activity = <Date 2022-02-10.12:57:59.448>
    actor = 'Mark.Shannon'
    assignee = 'Mark.Shannon'
    closed = False
    closed_date = None
    closer = None
    components = []
    creation = <Date 2022-01-26.09:44:42.979>
    creator = 'Mark.Shannon'
    dependencies = []
    files = []
    hgrepos = []
    issue_num = 46532
    keywords = ['patch']
    message_count = 3.0
    messages = ['411721', '411723', '412996']
    nosy_count = 1.0
    nosy_names = ['Mark.Shannon']
    pr_nums = ['31231']
    priority = 'normal'
    resolution = None
    stage = 'patch review'
    status = 'open'
    superseder = None
    type = None
    url = 'https://bugs.python.org/issue46532'
    versions = []

    Linked PRs

    • GH-90690: Mention removal of PRECALL in What's New #103910
    • [3.12] GH-90690: Mention removal of PRECALL in What's New (GH-103910) #109027

    Activity

    1. markshannon commented on Jan 26, 2022

      @markshannon
      markshannon
      on Jan 26, 2022
      MemberAuthor
      More actions

      The PRECALL/CALL bytecode pair for calls is new (still in review at time of writing) and is not as efficient as it could be.

      Some possible improvements are:

      Transfer refcount of func when making a frame.

      NULL call_shape.kwnames after use instead of in PRECALL, as many specialized instructions already assert that it is NULL.

      Specialize the PRECALL instructions. Either for simple cases like type(arg) so we can skip the CALL, or for complex cases like PythonClass(args) where PRECALL can create object, and set up the frame so that CALL calls the init function.

    2. markshannon
      assigned
      markshannon
      on Jan 26, 2022
    3. markshannon commented on Jan 26, 2022

      @markshannon
      markshannon
      on Jan 26, 2022
      MemberAuthor
      More actions

      Possibly consider replacing the specializations for str(arg) and tuple(arg) with a more general bytecode that can be used for other objects as well.

    4. markshannon
      changed the title [-]Improve effeciency of PRECALL/CALL instructions[/-] [+]Improve efficiency of PRECALL/CALL instructions[/+] on Feb 9, 2022
    5. markshannon
      changed the title [-]Improve effeciency of PRECALL/CALL instructions[/-] [+]Improve efficiency of PRECALL/CALL instructions[/+] on Feb 9, 2022
    6. markshannon commented on Feb 10, 2022

      @markshannon
      markshannon
      on Feb 10, 2022
      MemberAuthor
      More actions

      New changeset 2cea8c2 by Mark Shannon in branch 'main':
      bpo-46532: Reduce number of memory writes to update call_shape.kwnames. (GH-31231)
      2cea8c2

    7. ezio-melotti
      transferred this issue fromon Apr 10, 2022
    8. AlexWaygood
      added
      type-featureA feature request or enhancementA feature request or enhancement
      performancePerformance or resource usagePerformance or resource usage
      on Apr 10, 2022
    9. markshannon commented on May 18, 2022

      @markshannon
      markshannon
      on May 18, 2022
      MemberAuthor
      More actions

      As described here we can remove the PRECALL instruction entirely, shortening the call sequence for many calls.

    10. markshannon
      added a commit that references this issue on May 19, 2022

      GH-90690: Remove `PRECALL` instruction (GH-92925)

      e48ac9c
    11. markshannon
      closed this as completedon Aug 1, 2022
    12. hugovk
      added a commit that references this issue on Sep 6, 2023

      GH-90690: Mention removal of ``PRECALL`` in What's New (#103910)

      f9bd6e4
    13. miss-islington
      added a commit that references this issue on Sep 6, 2023

      pythonGH-90690: Mention removal of ``PRECALL`` in What's New (pythonG…

      12bb8ec
    14. Yhg1s
      added a commit that references this issue on Sep 8, 2023

      [3.12] GH-90690: Mention removal of ``PRECALL`` in What's New (GH-103910

      19d8226
    15. mwath
      added a commit that references this issue on Mar 24, 2026

      [REF] base: remove legacy opcodes

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

    Metadata

    Metadata

    Assignees

    • @markshannon
      markshannon

    Labels

    performancePerformance or resource usagePerformance or resource usagetype-featureA feature request or enhancementA feature request or enhancement

    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.