Skip to content

Compiling executors can result in excessively large amounts of machine code. #141794

Open

Description

@markshannon

With the tracing front-end to the JIT we are producing longer traces than before.
This should be good, but results in very large chunks of machine code.
Large chunks of machine code are bad because:

  • It takes longer and uses more memory
  • It puts a lot of pressure on the icache, possibly evicting the interpreter
  • It makes handling of inline data and branches less efficient as the targets are further away.

To be clear, the problem is not the number of uops per trace, but the amount of machine code per uop.

Things we can do to fix this:

  • Move code into helper functions for the larger uops
  • Move complex decref sequences for DECREF_INPUTS() into helper functions.

(We can also do more optimizations to remove more uops, but that's a separate issue and we're doing it anyway)

Linked PRs

Activity

  1. added
    performance
    interpreter-core
    3.15
    on Nov 20, 2025
  2. added
    type-feature
    and removed
    3.15
    on Dec 3, 2025
  3. added a commit that references this issue on Dec 3, 2025
  4. added a commit that references this issue on Dec 6, 2025
  5. added a commit that references this issue on Dec 7, 2025
  6. added a commit that references this issue on Dec 7, 2025
  7. added a commit that references this issue on Dec 8, 2025
  8. added a commit that references this issue on Dec 8, 2025
  9. added a commit that references this issue on Dec 8, 2025
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-coreperformancetopic-JITtype-feature

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions