News for hackers. Stuff that matters.
Re:Performance of the Python 3.14 tail-call interpreter by celeritascelery on Monday March 10, 2025 @03:47PM (#43325134)
How do you reconcile that with the observation that moving to a computed goto style provides better codegen in zig[1]? They make the claim that using their “labeled switch” (which is essentially computed goto) allows you to have multiple branches which improves branch predictor performance. They even get a 13% speedup in their parser from switch to this style. If modern CPU’s are good at predicting through a single branch, I wouldn’t expect this feature to make any difference.

[1] https://ziglang.org/download/0.14.0/release-notes.html#Code-...

Re:Performance of the Python 3.14 tail-call interpreter by dwattttt on Monday March 10, 2025 @05:21PM (#43326239)
While it's unlikely as neat as this, the blog post we're all commenting on is a "I thought we had a 10-15% speedup, but it turned out to be an LLVM optimisation misbehaving". And Zig (for now) uses LLVM for optimised builds too