News for hackers. Stuff that matters.
Re:Performance of the Python 3.14 tail-call interpreter by AlexSW on Monday March 10, 2025 @10:15AM (#43320894)
I'm struggling to confirm that my intuition of why the compiler optimisation is faster than the naive switch expansion.

Is it about the layout of where the assembly instructions end up, and spacing around them? Or the CPU pipelining working better? Or...?

Re:Performance of the Python 3.14 tail-call interpreter by csjh on Monday March 10, 2025 @01:59PM (#43323441)
distributing the dispatch instructions lets the predictor pick up on specific patterns within the bytecode - for example, comparison instructions are probably followed by a conditional branch instruction
Re:Performance of the Python 3.14 tail-call interpreter by AlexSW on Monday March 10, 2025 @03:57PM (#43325271)
Ah of course! It's improving the branch target predictor. Makes sense, thanks!