GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | ||||||||||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | ||||||||||||
GeezerVison is showing github.com — Tail calling interpreter for MSVC · Issue #139922 · python/cpython Closed Labels OS-windowsinterpreter-core(Objects, Python, Grammar, and Parser dirs)(Objects, Python, Grammar, and Parser dirs)type-featureA feature request or enhancementA feature request or enhancement DescriptionFeature or enhancementProposal:We should get tail calling interpreter support for MSVC.
On Windows, the performance isn't easy to measure because Note that I had to apply a 2-line patch to fix xDSL for Python 3.15. Nbody and spectralnorm are toy shootout benchmarks. xDSL is a new benchmark added that is a MLIR DSL library with written almost entirely in pure Python. I consider it a pure-Python large library not too far off from mypy (though it's obviously smaller). 14% faster for xDSL is massive. It's roughly half of the speedup we got in 3.11 with the specializing interpreter, and that was thousands of lines of code. This change in contrast will be just one PR. Django templating shows a big speedup too -- 18% faster. This could not have been possible without help from the MSVC team. Specifically, I'd like to give a shoutout to Hulon Jenkins and the MSVC team in the patch notes when I land this. I've discussed this during the Wednesday CHIPS meetings, and there was no opposition to the new set of changes required to get this working. The changes are minimal and mostly just involve adding correct We require working CI before this is merged, so I am now waiting on GitHub actions or some other CI to get this working. Very special shoutout as well to @chris-eibl who has been helping me with this on Windows. Some other benefits: the TC on MSVC actually correctly "resets" the inlining heuristic on MSVC. This means eventually we can get rid of all the macros and ugly hacks we have to make the current interpreter faster on MSVC once we distribute the builds with tail calling. Example of a hack where we use macros over static inlines on MSVC just because of the interpreter loop breaking the inliniing heuristics of MSVC #121263 Possibility of a compiler bug this timeI doubt it, as MSVC has no computed goto, so it can't have the same bug as Clang that we bumped into the previous time. Where are the perf gains coming from?It's mainly the better inlining that we get from the tail calling interpreter, and elimination of double jumps vs the switch-case interpreter. Has this already been discussed elsewhere?No response given Links to previous discussion of this feature:No response Linked PRs
Reacted by Sergey Miryanov Reacted by Sergey Miryanov, Emma Smith, Mikhail Efimov, Daniel Hollas, Wulian233, Peter Bierma, Chris Eibl, Denis, Semyon Moroz and Sacul Activity
MetadataMetadataAssigneesLabelsOS-windowsinterpreter-core(Objects, Python, Grammar, and Parser dirs)(Objects, Python, Grammar, and Parser dirs)type-featureA feature request or enhancementA feature request or enhancement ProjectsMilestoneRelationshipsDevelopmentIssue actions | ||||||||||||
| You are visitor 01402503 — GeezerVison does not store the pages you look up. Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required. |