Skip to content

Split hot and cold parts of the templates. #116422

Closed

Activity

  1. markshannon commented on Mar 6, 2024

    @markshannon
    MemberAuthor

    In order to split out the cold parts of instructions we will need to support jumps within executors.
    Something like:

    tier2 op(_JUMP_TIER2, (offset/4 --)) {
        JUMP_BY(offset);
    }
    

    @brandtbucher How much effort to support this in the JIT?
    I assume not that much as the prototype must have supported _POP_JUMP_IF_FALSE.

  2. brandtbucher commented on Mar 6, 2024

    @brandtbucher
    Member

    Not hard. We already loop once to get the total size before compiling, so collecting offsets during that same step isn't difficult.

  3. brandtbucher commented on Mar 6, 2024

    @brandtbucher
    Member

    And yeah, the prototype already did this at one point back when we had exit stubs.

  4. brandtbucher commented on Mar 6, 2024

    @brandtbucher
    Member

    Maybe not worth pursuing yet, but just realized: if we make all jumps backwards (meaning, put cold stubs before the entry point) then we can emit the entire thing in one forward pass once we have a slab allocator. But probably more trouble than it's worth right now.

  5. self-assigned this
    on Mar 6, 2024
  6. added
    performancePerformance or resource usage
    interpreter-core(Objects, Python, Grammar, and Parser dirs)
    3.13only security fixes
    on Mar 6, 2024
  7. added 2 commits that reference this issue on Mar 14, 2024
  8. added 2 commits that reference this issue on Mar 20, 2024
  9. added 2 commits that reference this issue on Mar 25, 2024
  10. added a commit that references this issue on Mar 26, 2024
  11. added a commit that references this issue on Apr 1, 2024
  12. added 3 commits that reference this issue on Apr 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

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

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions