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

Implement infrastructure for quickening and specializing #88353

Closed
markshannon opened this issue May 20, 2021 · 4 comments
Closed

Implement infrastructure for quickening and specializing #88353

markshannon opened this issue May 20, 2021 · 4 comments
Assignees
Labels
3.11 only security fixes performance Performance or resource usage

Comments

@markshannon
Copy link
Member

BPO 44187
Nosy @markshannon, @pablogsal, @brandtbucher, @isidentical
PRs
  • bpo-44187: Quickening infrastructure #26264
  • bpo-44187: Delete line that was accidentally copied. #26624
  • 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 = <Date 2021-06-09.17:21:18.301>
    created_at = <Date 2021-05-20.11:15:19.660>
    labels = ['3.11', 'performance']
    title = 'Implement infrastructure for quickening and specializing'
    updated_at = <Date 2021-06-09.17:21:18.300>
    user = 'https://github.com/markshannon'

    bugs.python.org fields:

    activity = <Date 2021-06-09.17:21:18.300>
    actor = 'Mark.Shannon'
    assignee = 'Mark.Shannon'
    closed = True
    closed_date = <Date 2021-06-09.17:21:18.301>
    closer = 'Mark.Shannon'
    components = []
    creation = <Date 2021-05-20.11:15:19.660>
    creator = 'Mark.Shannon'
    dependencies = []
    files = []
    hgrepos = []
    issue_num = 44187
    keywords = ['patch']
    message_count = 4.0
    messages = ['394013', '395270', '395443', '395444']
    nosy_count = 4.0
    nosy_names = ['Mark.Shannon', 'pablogsal', 'brandtbucher', 'BTaskaya']
    pr_nums = ['26264', '26624']
    priority = 'normal'
    resolution = 'fixed'
    stage = 'resolved'
    status = 'closed'
    superseder = None
    type = 'performance'
    url = 'https://bugs.python.org/issue44187'
    versions = ['Python 3.11']

    @markshannon
    Copy link
    Member Author

    As described in PEP-659 (Specializing Adaptive Interpreter) the first part of implementing specialization is to implement the machinery to do the quickening.

    Conceptually, this is fairly simple: add a new field to the code object, which points to the first instruction in the bytecode.

    When quickening, we create a new array, copy the old bytecode into it, and make the new field point to it.

    Without any specialization or superinstructions, this will just waste memory.
    However, it will pay off soon enough as we implement superinstructions, remove the old "opcache" and add new specializations.

    We expect to see worthwhile speed ups with just superinstructions, and large speedups when all the above features have been implemented.

    @markshannon markshannon self-assigned this May 20, 2021
    @markshannon markshannon added the performance Performance or resource usage label May 20, 2021
    @markshannon markshannon self-assigned this May 20, 2021
    @markshannon markshannon added the performance Performance or resource usage label May 20, 2021
    @markshannon
    Copy link
    Member Author

    New changeset 001eb52 by Mark Shannon in branch 'main':
    bpo-44187: Quickening infrastructure (GH-26264)
    001eb52

    @iritkatriel iritkatriel added 3.11 only security fixes labels Jun 7, 2021
    @pablogsal
    Copy link
    Member

    Is anything left in this issue?

    @markshannon
    Copy link
    Member Author

    No, this is done

    @ezio-melotti ezio-melotti transferred this issue from another repository Apr 10, 2022
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
    Labels
    3.11 only security fixes performance Performance or resource usage
    Projects
    None yet
    Development

    No branches or pull requests

    3 participants