Build `CPython` with `--disable-gil` and `--enable-experimental-jit=yes-off` for better performance.
--disable-gil will allow python running in a free-threaded mode, allowing python to utilize multiple cpu core in a single process. This feature seems disabled by default thus not affecting the compatibility.
--enable-experimental-jit=yes-off will allow python running with JIT but disable it by default for compatibility reason.
The jit is going to have to wait until upstream python makes a release with llvm 19 support, it is upstreamed but I'm not up for backporting all the patches.
The gil change is trickier for a different reason, the change has negative performance impact for single threaded code (up to 40%) and memory size penalties that can be quite large for multithreaded code that are scheduled to be improved in 3.14. I'll try and do some benchmarking to compare but at this point I'm not inclined to enable it right now.
Any update? Will the performance regression disappear when gil is manually enabled in a gil-disabled build?
3.13.1 is still not out so jit is still waiting.
I haven't had time to do performance testing yet.