frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

Open Source @Github

fp.

Open in hackernews

Python 3.15’s interpreter for Windows x86-64 should hopefully be 15% faster

https://fidget-spinner.github.io/posts/no-longer-sorry.html
114•lumpa•3h ago

Comments

machinationu•2h ago
The Python interpreter core loop sounds like the perfect problem for AlphaEvolve. Or it's open source equivalent OpenEvolve if DeepMind doesn't want to speed up Python for the competition.
g947o•2h ago
> This has caused many issues for compilers in the past, too many to list in fact. I have a EuroPython 2025 talk about this.

Looks like it refers to this:

https://youtu.be/pUj32SF94Zw

(wish it's a link in the article)

Hendrikto•1h ago
TLDR: 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 time of writing, CPython 3.15’s interpreter loop is around 12k lines of C code. That’s 12k lines in a single function for the switch-case and computed goto interpreter.

> […] In short, this overly large function breaks a lot of compiler heuristics.

> One of the most beneficial optimisations is inlining. In the past, we’ve found that compilers sometimes straight up refuse to inline even the simplest of functions in that 12k loc eval loop.

develatio•1h ago
if the author of this blog reads this: can we can an RSS, please?
kenjin4096•1h ago
Got it. I'll try to set one up this weekend.
redox99•1h ago
This 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?

kccqzy•1h ago
Python’s goal is never really to be fast. If that were its goal, it would’ve had a JIT long ago instead of toying with optimizing the interpreter. Guido prioritized code simplicity over speed. A lot of speed improvements including the JIT (PEP 744 – JIT Compilation) came about after he stepped down.
LtWorf•25m ago
If you want fast just use pypy and forget about cpython.
mananaysiempre•1h ago
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 to the function declarator and does not work as a function specifier: `static void *__preserve_none slowpath();` and not `__preserve_none static void *slowpath();` (unlike GCC attribute syntax, which tends to be fairly gung-ho about this sort of thing, sometimes with confusing results).

Yay to getting undocumented MSVC features disclosed if Microsoft thinks you’re important enough :/

publicdebates•1h ago
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.
HPsquared•1h ago
I wonder if this is related to Python in Excel. You'll have lots of people running numerical stuff written in Python, running on Microsoft servers.
mkoubaa•56m ago
A lot of commercial engineering and scientific software runs on windows.
andix•29m ago
I guess there are some Python workloads on Azure, Microsoft provides a lot of data analysis and LLM tools as a service (not paid by CPU minutes). Saving CPU cycles there directly translates to financial savings.
monster_truck•42m ago
I don't understand what the scene in a porno when they cum has to do with python
furyofantares•33m ago
That's not where the term comes from https://en.wikipedia.org/wiki/Money_shot
abacuss•27m ago
I don't understand why your mind went immediately to pornography. Kind of creepy tbh.
ambicapter•11m ago
You're overreacting, see the wikipedia article posted above.

> By 1977[2][3] the phrase had entered American usage as slang for the cum shot in a pornographic film

https://en.wikipedia.org/wiki/Money_shot

bgwalter•23m ago
MSVC mostly generates slower code than gcc/clang, so maybe this trick reduces the gap.
metaltyphoon•21m ago
Is this backed by real evidence?
bluecalm•7m ago
My experience is 10%-15% slower than GCC. That was 10 years ago though.
jtrn•18m ago
Im a bit out of the loop with this, but hope its not like that time with python 3.14, when it was claimed a geometric mean speedup of about 9-15% over the standard interpreter when built with Clang 19. It turned out the results were inflated due to a bug in LLVM 19 that prevented proper "tail duplication" optimization in the baseline interpreter's dispatch loop. Actual gains was aprox 4%.

Edit: 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.

Python 3.15’s interpreter for Windows x86-64 should hopefully be 15% faster

https://fidget-spinner.github.io/posts/no-longer-sorry.html
116•lumpa•3h ago•27 comments

The entire New Yorker Archive Is Now Fully Digitized

https://www.newyorker.com/news/press-room/the-entire-new-yorker-archive-is-now-fully-digitized
75•thm•5d ago•7 comments

Alzheimer's can be reversed to achieve full neurological recovery in animals

https://case.edu/news/new-study-shows-alzheimers-disease-can-be-reversed-achieve-full-neurologica...
72•thunderbong•48m ago•5 comments

Toys with the highest play-time and lowest clean-up-time

https://joannabregan.substack.com/p/toys-with-the-highest-play-time-and
30•surprisetalk•6d ago•10 comments

Phoenix: A modern X server written from scratch in Zig

https://git.dec05eba.com/phoenix/about/
537•snvzz•17h ago•289 comments

We invited a man into our home at Christmas and he stayed with us for 45 years

https://www.bbc.co.uk/news/articles/cdxwllqz1l0o
491•rajeshrajappan•5h ago•101 comments

Salesforce regrets firing 4000 experienced staff and replacing them with AI

https://maarthandam.com/2025/12/25/salesforce-regrets-firing-4000-staff-ai/
10•whynotmaybe•1h ago•4 comments

Tell HN: Merry Christmas

1582•basilikum•17h ago•362 comments

The First Photographs of Snowflakes Discover the Groundbreaking Microphotography

https://www.openculture.com/2017/12/the-first-photographs-of-snowflakes.html
52•_____k•6d ago•7 comments

Mattermost restricted access to old messages after 10000 limit is reached

https://github.com/mattermost/mattermost/issues/34271
229•xvilka•5h ago•118 comments

Project Dropstone: A Neuro-Symbolic Runtime for Long-Horizon Engineering [pdf]

https://archive.blankline.org/api/media/file/d3_engine_public_release%20(1)-1.pdf
15•epicprogrammer•13h ago•2 comments

Who Watches the Waymos? I do [video]

https://www.youtube.com/watch?v=oYU2hAbx_Fc
217•notgloating•16h ago•73 comments

Ask HN: How do I bridge the gap between PhD and SWE experiences?

25•ecophyseis•6d ago•19 comments

Quantum Error Correction Goes FOOM

https://algassert.com/post/2503
37•EvgeniyZh•6h ago•8 comments

Self-referencing Page Tables for the x86-Architecture

https://0l.de/blog/2015/01/bachelor-thesis-abstract/
38•stv0g•7h ago•8 comments

Ruby 4.0.0

https://www.ruby-lang.org/en/news/2025/12/25/ruby-4-0-0-released/
509•FBISurveillance•11h ago•92 comments

Fabrice Bellard: Biography (2009) [pdf]

https://www.ipaidia.gr/wp-content/uploads/2020/12/117-2020-fabrice-bellard.pdf
312•lioeters•21h ago•95 comments

Show HN: Minimalist editor that lives in browser, stores everything in the URL

https://github.com/antonmedv/textarea
384•medv•20h ago•131 comments

Asterisk AI Voice Agent

https://github.com/hkjarral/Asterisk-AI-Voice-Agent
150•akrulino•16h ago•77 comments

The Fisher-Yates shuffle is backward

https://possiblywrong.wordpress.com/2020/12/10/the-fisher-yates-shuffle-is-backward/
40•possiblywrong•5d ago•12 comments

CSRF protection without tokens or hidden form fields

https://blog.miguelgrinberg.com/post/csrf-protection-without-tokens-or-hidden-form-fields
252•adevilinyc•3d ago•90 comments

Fabrice Bellard Releases MicroQuickJS

https://github.com/bellard/mquickjs/blob/main/README.md
1410•Aissen•1d ago•529 comments

Show HN: Vibium – Browser automation for AI and humans, by Selenium's creator

https://github.com/VibiumDev/vibium
361•hugs•22h ago•103 comments

Research team digitizes more than 100 years of Canadian infectious disease data

https://news.mcmaster.ca/mcmaster-research-team-digitizes-more-than-100-years-of-canadian-infecti...
138•XzetaU8•6d ago•6 comments

Show HN: Exploring Mathematics with Python

https://coe.psu.ac.th/ad/explore/
175•Andrew2565•6d ago•17 comments

JEDEC developing reduced pin count HBM4 standard to enable higher capacity

https://blocksandfiles.com/2025/12/17/jedec-sphbm4/
55•rbanffy•6d ago•8 comments

Using Vectorize to build an unreasonably good search engine in 160 lines of code

https://blog.partykit.io/posts/using-vectorize-to-build-search/
100•ColinWright•3d ago•29 comments

Comptime – C# meta-programming with compile-time code generation and evaluation

https://github.com/sebastienros/comptime
118•bj-rn•4d ago•51 comments

Handheld PC Community Forums

https://www.hpcfactor.com/forums/category-view.asp
37•walterbell•3d ago•12 comments

Nvidia to buy assets from Groq for $20B cash

https://www.cnbc.com/2025/12/24/nvidia-buying-ai-chip-startup-groq-for-about-20-billion-biggest-d...
613•nickrubin•19h ago•349 comments