Skip to content

Reduce the overhead of tracing, profiling and quickening checks for calls. #112

@markshannon

Description

@markshannon

When entering a Python function we need to check for tracing/profiling and check to see if the function needs to be quickened.
We should be able to eliminate these checks for calls in most cases by:

  1. Adding a START_FUNCTION instruction which does the above checks.
  2. Quickening the START_FUNCTION to a NOP.
  3. When specializing Python-to-Python calls, set f_lasti to 0 not -1, thus skipping the entry sequence entirely.

When exiting a function, we still need to check for tracing and profiling. This can be eliminated by adding a RETURN_VALUE_QUICK bytecode that skips the checks.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

Status

Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions