Live data from Hacker News

Python 3.14 is here. How fast is it?

blog.miguelgrinberg.com

401–410 of 579 posts

Re: Python 3.14 is here. How fast is it?

#401
post #305

Earlier quoted context omitted.

I was unaware of the new logo… and I am just realizing for the first time after many many Flask apps… that the logo is not a chili pepper.

This logo is bad.. not even talking about the mark, the fonts are wtf. Uppercase 'F' shorter than the lower 'l' and 'k', the 'a' and the 'k' bad, even the lower bar on the 'f' angle is just... eww. And then the mark. I dont get any of this.

Oof that a

Re: Python 3.14 is here. How fast is it?

#402
post #332

Earlier quoted context omitted.

To be fair, if math did have version numbers, we could abandon a lot of hideous notational cruft / symbol overloading, and use tau instead of pi. Math notation is arguably considerably worse than perl -- can you imagine if perl practically required a convention of single-letter variable names everywhere? What modern language designer would make it so placing two variable names right next to each other denotes multipl…

If the compiler forbade syntactic ambiguity from implicit multiplication and had a sensible LSP allowing it to be rendered nicely, I don't think that'd be such a bad thing. Depending on the task at hand you might prefer composition or some other operation, but when reducing character count allows the pattern recognition part of our brain to see the actual structure at hand instead of wading through character soup it…

Yep, this explains why the APL programming language was so ridiculously successful.

Re: Python 3.14 is here. How fast is it?

#403

I feel like Python should be much faster already. With all the big companies using Python and it's huge popularity I would have expected that a lot of money, work and research would be put into making Python faster and better.

The Faster CPython project was from one of "the big companies" and did make significant progress with each version of Python, even if some of its more ambitious goals weren't met. The results of which you're seeing in the benchmarks in this blog post.

Re: Python 3.14 is here. How fast is it?

#404
post #21

Every time I hear news about Python language itself, it sadden me that, in 2025, PyPy is still a separate distinct track from mainline Python. That said, I wonder if GIL-less Python will one day enable GIL-less C FFI? That would be a big win that Python needs.

I don't understand why C FFI is that popular. The amount of time it takes spent to write all the cffi stuff is the same amount it takes to write an executable in C and call it from python. The only time cffi is useful is if you want to have that code be dynamic, which is a very niche use case.

We need the FFI to share memory in-process with C functions?

Re: Python 3.14 is here. How fast is it?

#405

Earlier quoted context omitted.

Or have it run some super common use case like a FastAPI endpoint or a numpy calculation. Yes, they are not all python, but it's what most people use Python for.

FastAPI is a web framework, which by definition is (or should be!) an I/O bound process. My benchmark evaluates CPU, so it's a different thing. There are a ton of web framework benchmarks out there if you are interested in FastAPI and other frameworks. And numpy is a) written in C, not Python, and b) is not part of Python, so it hasn't changed when 3.14 was released. The goal was to evaluate the Python 3.14 interpret…

That's the thing with Python: A lot of things should be bound by all kinds of limitations, but are in practice often limited by the Python interpreter if not done carefully.

Fundamentally for example, if you're doing some operations on numpy arrays like: c = a + b * c, interpreted numpy will be slower than compiled numba or C++ just because an eager interpreter will never fuse those operations into an FMA.

Re: Python 3.14 is here. How fast is it?

#406

Earlier quoted context omitted.

I don't understand why C FFI is that popular. The amount of time it takes spent to write all the cffi stuff is the same amount it takes to write an executable in C and call it from python. The only time cffi is useful is if you want to have that code be dynamic, which is a very niche use case.

Could you go into more detail? How would you build e.g. numpy without FFI?

These days you could probably build a pretty performant numpy like using shared memory with Arrow format and IPC for control. Though it would be considerably more complex and not at all easier than FFI...

Re: Python 3.14 is here. How fast is it?

#407
post #379

Earlier quoted context omitted.

To be fair, if math did have version numbers, we could abandon a lot of hideous notational cruft / symbol overloading, and use tau instead of pi. Math notation is arguably considerably worse than perl -- can you imagine if perl practically required a convention of single-letter variable names everywhere? What modern language designer would make it so placing two variable names right next to each other denotes multipl…

What in the Hacker News in this comment? Mathematical notation evolved to its modern state over centuries. It's optimized heavily for its purpose. Version numbers? You're being facetious, right?

>evolved

Yes, it evolved. It wasn't designed.

>Version numbers?

Without version numbers, it has to be backwards-compatible, making it difficult to remove cruft. What would programming be like if all the code you wrote needed to work as IBM mainframe assembly?

Tau is a good case study. Everyone seems to agree tau is better than pi. How much adoption has it seen? Is this what "heavy optimization" looks like?

It took hundreds of years for Arabic numerals to replace Roman numerals in Europe. A medieval mathematician could have truthfully said: "We've been using Roman numerals for hundreds of years; they work fine." That would've been stockholm syndrome. I get the same sense from your comment. Take a deep breath and watch this video: https://www.youtube.com/watch?v=KgzQuE1pR1w

>You're being facetious, right?

I'm being provocative. Not facetious. "Strong opinions, weakly held."

Re: Python 3.14 is here. How fast is it?

#408

Earlier quoted context omitted.

Are you asking why the M2 is faster than the i5?

Well I was asking whether there is something in the Mac Kernel which makes it faster or is it just the different CPUs/Memory that account for this?

According to general benchmarks Apple Silicon is the highest performing CPU for single-threaded work. It'll be hard to confirm how much of a difference the OS factors in but the hardware difference is most likely why.

Re: Python 3.14 is here. How fast is it?

#409
post #74

Earlier quoted context omitted.

Because in the real world, for code where performance is needed, you run the profiler and either find that the time is spent on I/O, or that the time is spent inside native code.

I do a bit of performance work and find most often that things are mixed: there’s enough CPU between syscalls that the hardware isn’t being full maximized, but there’s enough I/O the CPUs aren’t pegged either. It is rare that the profiler finds an obvious hotspot that yields an easy win; usually it shows that with heavy refactoring you can make 10% of your load several times faster, and then you’ll need to do the sam…

This "There are no hot spots, it's just a uniform glowing orange" situation is why Google picked C++ and then later Rust and to some extent why they picked Go too.

Re: Python 3.14 is here. How fast is it?

#410
post #21

Every time I hear news about Python language itself, it sadden me that, in 2025, PyPy is still a separate distinct track from mainline Python. That said, I wonder if GIL-less Python will one day enable GIL-less C FFI? That would be a big win that Python needs.

The biggest thing PyPy adds is JIT compilation. This is precisely what the project to add JIT to CPython is working on these days. It's still early days for the project, but by 3.15 there's a good chance we'll see some really great speedups in some cases.

It's worth noting that PyPy devs are in the loop, and their insights so far have been invaluable.

Post reply on HN