Live data from Hacker News

Python 3.14 is here. How fast is it?

blog.miguelgrinberg.com

231–240 of 579 posts

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

#231

Do any of these tests measure the new experimental tail call interpreter ( https://docs.python.org/3.14/using/configure.html#cmdoption-... )? I couldn't find any note of it, so I would assume not. It would be interesting to see how the tail call interpreter compares to the other variants.

The build of Python that I used has tail calls enabled (option --with-tail-call-interp). So that was in place for the results I published. I'm not sure if this optimization applies to recursive tail calls, but if it does, my Fibonacci test should have taken advantage of the optimization.

It wouldn’t have, since

    fib(n-1) + fib(n-2)
isn’t a tail call—there’s work left after the recursive calls, so the tail call interpreter can’t optimize it.

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

#232
post #10

Tangential, but I practically owe my life to this guy. He wrote the flask mega tutorial in what I followed religiously to launch my first website. Then right before launch, in the most critical part of my entire application; piping a fragged file in flask. He answered my stackoverflow question, I put his fix live, and the site went viral. Here's the link for posterity's sake https://stackoverflow.com/a/34391304/41802…

> flask Off-topic, but I absolutely loathe new Flask logo. Old one[0] has this vintage, crafty feel. And the new one[1] looks like it was made by a starving high schooler experimenting with WordArt. [0] - https://upload.wikimedia.org/wikipedia/commons/3/3c/Flask_lo... [1] - https://flask.palletsprojects.com/en/stable/_images/flask-na...

Wow, the new one is disgusting.

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

#234
post #7

I'm thankful they included a compiled language for comparison, because most of the time when I see Python benchmarks, they measure against other versions of Python. But "fast python" is an oxymoron and 3.14 doesn't seem to really change that, which I feel most people expected given the language hasn't fundamentally changed. This isn't a bad thing; I don't think Python has to be or should be the fastest language in th…

I agree. Unless they make it like 10x faster it doesn't really change anything. It's still a language you only use if you absolutely don't care whatsoever about performance and can guarantee that you never will .

>>> you absolutely don't care whatsoever about performance and can guarantee that you never will.

Those are actually pretty good bets, better than most other technological and business assumptions made during projects. After all, a high percentage of projects, perhaps 95%, are either short term or fail outright.

And in my own case, anything I write that is in the 5% is certain to be rewritten from scratch by the coding team, in their preferred language.

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

#235

Earlier quoted context omitted.

> flask Off-topic, but I absolutely loathe new Flask logo. Old one[0] has this vintage, crafty feel. And the new one[1] looks like it was made by a starving high schooler experimenting with WordArt. [0] - https://upload.wikimedia.org/wikipedia/commons/3/3c/Flask_lo... [1] - https://flask.palletsprojects.com/en/stable/_images/flask-na...

yikes, that is not a great logo. it has also lost its essence

But, this seems to me the gestalt of modern design. Less less less. Until it is no more.

I also hate the new ones. And most of what modern design pumps out now days.

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

#236

Earlier quoted context omitted.

That's because you're doing web stuff. (I/O limited). So much of our computing experience has been degraded due to this mindset applied more broadly. Despite a steady improvement in hardware, my computing experiences have been stagnating and degraded in terms of latency, responsiveness etc. I'm not going to even go into the comp chem simulations I've been running, or that about 1/3 the stuff I do is embedded. I do st…

I won’t completely argue against that, and I’ve also adopted Rust for smaller or faster work. Still, I contend that a freaking enormous portion of computing workloads are IO bound to the point that even Python’s speed is Good Enough in an Amdahl’s Law kind of way.

I hear this a lot, but can you really say that you're consistently saturating a 1Gbps line for netcode or 6+ Gbps nvme for disk data? In my experience this doesn't really happen with code that isn't intentionally designed to minimize unnecessary work.

A lot of slow parsing tends to get grouped in with io, and this is where python can be most limiting.

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

#237

I don't know how realistic only using a benchmark that only uses tight loops and integer operations. Something with hashmaps and strings more realistically represents everyday cpu code in python; most python users offload numeric code to external calls.

I agree with you, this is not an in depth look, could have been much more rigorous. But then I think in some ways it's a much more accurate depiction of my use case. I mainly write monte-carlo simulations or simple scientific calculations for a diverse set of problems every day. And I'm not going to write a fast algorithm or use an unfamiliar library for a one-off simulation, even if the sim is going to take 10 minut…

Sounds like Julia would be a perfect fit for your use case.

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

#238

Earlier quoted context omitted.

Exactly, most Python devs neither need nor care about perf. Most applications don't even need perf, because whether it's .1 second or .001 seconds, the user is not going to notice. But this current quest to make Python faster is precisely because the sluggishness is noticeable for the task it's being used for most at the moment. That 6 second difference you note between the Optimal Python and the optimal Rust is mone…

> most Python devs neither need nor care about perf. You do understand that's a different but equivalent way of saying, " If you care about performance, then Python is not the language for you. ", don't you?

"Logically equivalent" is a very limited subset of "equivalent (in meaning)". Language is funny like that.

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

#239
post #10

Tangential, but I practically owe my life to this guy. He wrote the flask mega tutorial in what I followed religiously to launch my first website. Then right before launch, in the most critical part of my entire application; piping a fragged file in flask. He answered my stackoverflow question, I put his fix live, and the site went viral. Here's the link for posterity's sake https://stackoverflow.com/a/34391304/41802…

> flask Off-topic, but I absolutely loathe new Flask logo. Old one[0] has this vintage, crafty feel. And the new one[1] looks like it was made by a starving high schooler experimenting with WordArt. [0] - https://upload.wikimedia.org/wikipedia/commons/3/3c/Flask_lo... [1] - https://flask.palletsprojects.com/en/stable/_images/flask-na...

I think it should not have a logo, so it is left to interpretation.

Thinking about hand-rolled web services, I usually imagine either a stealth alcoholic's metal flask or a mad scientist's Erlenmeyer flask.

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

#240

Do any of these tests measure the new experimental tail call interpreter ( https://docs.python.org/3.14/using/configure.html#cmdoption-... )? I couldn't find any note of it, so I would assume not. It would be interesting to see how the tail call interpreter compares to the other variants.

The build of Python that I used has tail calls enabled (option --with-tail-call-interp). So that was in place for the results I published. I'm not sure if this optimization applies to recursive tail calls, but if it does, my Fibonacci test should have taken advantage of the optimization.

The tail calls in question are C tail calls inside the inner interpreter loop. They have nothing to do with Python function calls.
Post reply on HN