MacMusic  |  PcMusic  |  440 Software  |  440 Forums  |  440TV  |  Zicos
code
Search

Cuni: Tracing JITs in the real world @ CPython Core Dev Sprint

Thursday September 25, 2025. 09:13 PM , from LWN.net
Longtime PyPy developer Antonio Cuni has a
lengthy
blog post that describes his talk at the recently completed
2025
CPython
Core Dev Sprint, held at Arm in Cambridge, UK. The talk, entitled
'Tracing JIT and real world Python — aka: what we can learn from PyPy' was
meant to try to pass on some of his experiences 'optimizing existing
code for PyPy at a high-frequency trading firm' to the
developers working on the CPython JIT compiler. His goal was
to raise awareness of some of the problems he encountered:

Until now CPython's performance has been particularly predictable, there are well established 'performance tricks' to make code faster, and generally speaking you can mostly reason about the speed of a given piece of code 'locally'.

Adding a JIT completely changes how we reason about performance of a given program, for two reasons:

JITted code can be very fast if your code conforms to the heuristics applied by the JIT compiler, but unexpectedly slow(-ish) otherwise;

the speed of a given piece of code might depend heavily on what
happens elsewhere in the program, making it much harder to reason about
performance locally.

The end result is that modifying a line of code can significantly impact seemingly unrelated code. This effect becomes more pronounced as the JIT becomes more sophisticated.

Cuni also gave a talk on Python performance, which LWN covered, at
EuroPython 2025 in July.
https://lwn.net/Articles/1039612/

Related News

News copyright owned by their original publishers | Copyright © 2004 - 2025 Zicos / 440Network
Current Date
Sep, Fri 26 - 00:27 CEST