Skip to content

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

@markshannon

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    interpreter-core(Objects, Python, Grammar, and Parser dirs)performancePerformance or resource usagetopic-JITtype-featureA feature request or enhancement

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions