Live data from Hacker News

Python 3.14 is here. How fast is it?

blog.miguelgrinberg.com

201–210 of 579 posts

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

#201

What are the reasons why nobody uses pypy?

Because all the heavy number-crunching code is already written in C or Rust or as CUDA kernels, so the actual time spent running Python code is miniscule. If it starts to matter, I would probably reach for Cython first. PyPy is an extremely impressive project, but using it adds a lot of complexity to what is usually a glue language. It is a bit like writing a JIT for Bash.

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

#202

Earlier quoted context omitted.

A painful rewrite in another language is usually the only option in my experience. If you're really lucky you have a small hot part of the code and can move just that to another language (a la Pandas, Pytorch, etc.). But that's usually only the case for numerical computing. Most Python code has its slowness distributed over the entire codebase.

It’s not painful, that’s the point. You have a working prototype now ready to port. (If the destination language is painful perhaps, but don’t do that.) I recently ported a Python program to Rust and it took me much less time the second time, even though I write Rust more slowly per-line. Because I knew definitively what the program needed. And if even that is too much optimizing the Python or adding Cython to a few…

I have also ported a Python program to Rust (got a ~50x speedup) but this was a smallish program, under 10k lines of code.

Porting larger programs is rarely tractable. You can tell that because several large companies have decided that writing their own Python runtimes that are faster is less effort (although they all eventually gave up on that as far as I know).

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

#203

Earlier quoted context omitted.

I didn't know that they have the new logo before reading your comment. Been 2 years since I last searched flask but yeah the old logo was vintage and I also preferred the old logo and the new logo feels mid/sucks. The old logo is much better.

Old logo is impossible to resize and present on any assets that aren't rectangular. Flask isn't a country podunk restaurant

> Old logo is impossible to resize and present on any assets that aren't rectangular.

Neither is the new one, because you have to be a madman to show this hideous thing anywhere.

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

#204

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

Oh God, that's not it. The old logo is classic and bespoke. I could recall it from memory. It's impressionable. The new one looks like an unfunded 2005-era dorm room startup. XmlHttpRequests for sheep herders.

No, it looks like a disney channel show in 2008 that had one season

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

#205
post #185
post #82

Earlier quoted context omitted.

You hope it doesn't ? > [Donald Knuth] firmly believes that having an unchanged system that will produce the same output now and in the future is more important than introducing new features This is such a breath of fresh air in a world where everything is considered obsolete after like 3 years. Our industry has a disease, an insatiable hunger for newness over completeness or correctness . There's no reason we can't…

> There's no reason we can't be writing code that lasts 100 years. Code is just math. In theory, yes. In practice, no, because code is not just math, it's math written in a language with an implementation designed to target specific computing hardware, and computing hardware keeps changing. You could have the complete source code of software written 70 years ago, and at best you would need to write new code to emulat…

Given how mature emulation is now why couldn't that just continue to be possible into the future?

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

#206
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.

[flagged]

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

#207
post #205
post #185

Earlier quoted context omitted.

> There's no reason we can't be writing code that lasts 100 years. Code is just math. In theory, yes. In practice, no, because code is not just math, it's math written in a language with an implementation designed to target specific computing hardware, and computing hardware keeps changing. You could have the complete source code of software written 70 years ago, and at best you would need to write new code to emulat…

Given how mature emulation is now why couldn't that just continue to be possible into the future?

Or get an IBM 360 and have support for the next two thousand years, which is the choice our parents made.

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

#209
post #183

Earlier quoted context omitted.

> in any case. In some cases. Are looking up a single indexed row in a small K-V table? Yep, slow. Are you generating reports on the last 6 years of sales, grouped by division within larger companies? That might be pretty fast. I'm not sure why you'd even generalize that so overly broadly.

To put in perspective, 300ms is about looping over 30GiB data from RAM, loading 800MiB data from SSD, or doing 1TFLOPS on a single core computer. 300ms to generate a report would be able to go through ~100M rows at least (on a single core). And the implicit assumption that comment I made earlier, of course is not about the 100M rows scan. If there is a confusion, I am sorry.

That's all true, so long as you completely ignore doing any processing on the data, like evaluating the rows and selectively appending some of them into a data structure, then sorting and serializing the results, let alone optimizing the query plan for the state of the system at that moment and deciding whether it makes more sense to hit the indexes or just slurp in the whole table given that N other queries are also executing right now, or mapping a series of IO queries to their exact address in the underlying disks, and performing the parity checks as you read the data off the RAID and combine it into a single, coherent stream of not-block-aligned tuples.

There's a metric boatload of abstractions between sending a UTF-8 query string over the packet-switched network and receiving back a list of results. 300ms suddenly starts looking like a smaller window than it originally appears.

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

#210
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…

You have made my day, sir. :)

I also want to say thank you for the Flask Mega Tutorial.

When I started my first job as a Data Scientist, it helped me deploy my first model to production. Since then, I’ve focused much more on engineering.

You’ve truly started an amazing journey for me.

Thank you. :)

Post reply on HN