Live data from Hacker News

Python 3.14 is here. How fast is it?

blog.miguelgrinberg.com

171–180 of 579 posts

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

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

This might have been your experience, but mine has been very different. In my experience a typical python workload is 50% importing python libraries, 45% slow python wrapper logic and 5% fast native code. I spend a lot of time rewriting the python logic in C++, which makes it 100x faster, so the resulting performance approaches "10% fast native logic, 90% useless python imports".

There is more than one PEP related to making imports faster such as PEP 690 or PEP 810. It's definitely a well-known problem. The solution is probably right around the corner.

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

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

Also, that engineer time you would spend optimizing for performance costs more than just throwing more hardware at it.

Not if you have certain types of scientific data. You can't rent enough hardware to run the slow code.

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

#173

What are the reasons why nobody uses pypy?

A lot of Python use cases don't care about CPU performance at all.

In most cases where you do care about CPU performance, you're using numpy or scikit learn or pandas or pytorch or tensorflow or nltk or some other Python library that's more or just a wrapper around fast C, C++ or Fortran code. The performance of the interpreter almost doesn't matter for these use cases.

Also, those native libraries are a hassle to get to work with PyPy in my experience. So if any part of your program uses those libraries, it's way easier to just use CPython.

There are cases where the Python interpreter's bad performance does matter and where PyPy is a practical choice, and PyPy is absolutely excellent in those cases. They just sadly aren't common and convenient enough for PyPy to be that popular. (Though it's still not exactly unpopular.)

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

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

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

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

#178

Earlier quoted context omitted.

When I was in college I discovered the flask mega tutorial and fell in love with programming. Switched from an economics degree to software engineering and now work in the industry. Thank you for the work you put in.

Also discovered flask in college but was a year away from finishing a marketing degree. I'm now a SWE with just a marketing degree!

I am a SWE without any degrees. :D I dropped out to... study.

Yeah, our education system sucks that much.

https://www.youtube.com/watch?v=zDZFcDGpL4U

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

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

Whyyyyyyyy
Post reply on HN