The money shot (wish this were included in the blog post): # if defined(_MSC_VER) && !defined(__clang__) # define Py_MUSTTAIL [[msvc::musttail]] # define Py_PRESERVE_NONE_CC __preserve_none # else # define Py_MUSTTAIL __attribute__((musttail)) # define Py_PRESERVE_NONE_CC __attribute__((preserve_none)) # endif https://github.com/python/cpython/pull/143068/files#diff-45b... Apparently(?) this also needs to be attached…
[flagged]
Python 3.15’s interpreter for Windows x86-64 should hopefully be 15% faster
21–30 of 164 posts
Re: Python 3.15’s interpreter for Windows x86-64 should hopefully be 15% faster
#22The money shot (wish this were included in the blog post): # if defined(_MSC_VER) && !defined(__clang__) # define Py_MUSTTAIL [[msvc::musttail]] # define Py_PRESERVE_NONE_CC __preserve_none # else # define Py_MUSTTAIL __attribute__((musttail)) # define Py_PRESERVE_NONE_CC __attribute__((preserve_none)) # endif https://github.com/python/cpython/pull/143068/files#diff-45b... Apparently(?) this also needs to be attached…
Important enough, or benefits them directly? I have no good guesses how improving Python's performance would benefit them, but I would guess that's the real reason.
Re: Python 3.15’s interpreter for Windows x86-64 should hopefully be 15% faster
#23The money shot (wish this were included in the blog post): # if defined(_MSC_VER) && !defined(__clang__) # define Py_MUSTTAIL [[msvc::musttail]] # define Py_PRESERVE_NONE_CC __preserve_none # else # define Py_MUSTTAIL __attribute__((musttail)) # define Py_PRESERVE_NONE_CC __attribute__((preserve_none)) # endif https://github.com/python/cpython/pull/143068/files#diff-45b... Apparently(?) this also needs to be attached…
[flagged]
Re: Python 3.15’s interpreter for Windows x86-64 should hopefully be 15% faster
#24This seems like very low hanging fruit. How is the core loop not already hyper optimized? I'd have expected it to be hand rolled assembly for the major ISAs, with a C backup for less common ones. How much energy has been wasted worldwide because of a relatively unoptimized interpreter?
Re: Python 3.15’s interpreter for Windows x86-64 should hopefully be 15% faster
#25Re: Python 3.15’s interpreter for Windows x86-64 should hopefully be 15% faster
#26MSVC mostly generates slower code than gcc/clang, so maybe this trick reduces the gap.
Re: Python 3.15’s interpreter for Windows x86-64 should hopefully be 15% faster
#27Edit: Read through it and have come to the conclusion that the post is 100% OK and properly framed: He explicitly says his approach is to "sharing early and making a fool of myself," prioritizing transparency and rapid iteration over ironclad verification upfront.
One could make an argument that he should have cross-compiler checks, independent audits, or delayed announcements until results are bulletproof across all platforms. But given that he is 100% transparent with his thinking and how he works, it's all good in the hood.
Re: Python 3.15’s interpreter for Windows x86-64 should hopefully be 15% faster
#28Earlier quoted context omitted.
[flagged]
I don't understand why your mind went immediately to pornography. Kind of creepy tbh.
> By 1977[2][3] the phrase had entered American usage as slang for the cum shot in a pornographic film
Re: Python 3.15’s interpreter for Windows x86-64 should hopefully be 15% faster
#29Re: Python 3.15’s interpreter for Windows x86-64 should hopefully be 15% faster
#30TLDR: The tail-calling interpreter is slightly faster than computed goto. > I used to believe the the tailcalling interpreters get their speedup from better register use. While I still believe that now, I suspect that is not the main reason for speedups in CPython. > My main guess now is that tail calling resets compiler heuristics to sane levels, so that compilers can do their jobs. > Let me show an example, at the…