Live data from Hacker News

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

fidget-spinner.github.io

161–164 of 164 posts

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

#161

I don't understand this focus on micro performance details... considering that all of this is about an interpretation approach which is always going to be slow relatively speaking. The big speed up would be to JIT it all, then you dont need to care about structuring of switch loops etc

You'd be surprised at how little speedup you get from simply JIT-compiling the Python bytecode. It's so high-level that most interesting stuff happens in the layers below anyway.

But if that is so why this focus on the few clock cycles of dispatch?

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

#162

Earlier quoted context omitted.

You'd be surprised at how little speedup you get from simply JIT-compiling the Python bytecode. It's so high-level that most interesting stuff happens in the layers below anyway.

But if that is so why this focus on the few clock cycles of dispatch?

Because it is a fairly easy thing - it's a code transform that's mostly mechanical. And it also improves code quality, unusual for an optimization. So if that nets you those extra few percent, why not?

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

#163
post #124
post #114

Earlier quoted context omitted.

As a data point, running a Python program I've been working on lately, which is near enough entirely Python code, with a bit of I/O: (a prototype for some code I'll ultimately be writing in a lower-level language) (macOS Ventura, x64) - System python 3.9.6: 26.80s user 0.27s system 99% cpu 27.285 total - MacPorts python 3.9.25: 23.83s user 0.32s system 98% cpu 24.396 total - MacPorts python 3.13.11: 15.17s user 0.28s…

> [...] and I've just assumed the performance will still be as limited as it always has been...!) Historically CPython performance has been so bad, that massive speedups were quite possible, once someone seriously got into it.

And indeed that has proven the case. But my assumption was that Python had been so obviously designed with performance so very much not in mind, that it had ended up in some local minimum from which meaningful escape would be impossible. But I didn't overthink this opinion, and I've always liked Python well enough for small programs anyway, so I don't mind having it proven wrong.

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

#164

After years of admonition discouraging me, I’m using Python for a Windows GUI app over my usual C#/MAUI. I’m much more familiar with Python and the whole VS ecosystem is just so heavy for lightweight tasks. I started with tkinter but found it super clunky for interactions I needed heavily, like on field change, but learning QT seemed like more of a lift than I was interested in. (Maybe a skill issue on both fronts?)…

If anyone stumbles upon this in a search for Python UI libaries, also check out Textural. It's a TUI setup that can also be displayed in web browsers because it uses CSS for styling. At least for fairly uncomplicated UIs, it seems pretty simple, and has good event hook support. It has some features like event bubbling, and reactivity, which smack of JS front-end framework workflows on the data side, for better or worse.
Post reply on HN