Live data from Hacker News

Python-based compiler achieves orders-of-magnitude speedups

news.mit.edu

191–193 of 193 posts

Re: Python-based compiler achieves orders-of-magnitude speedups

#191
post #53

Earlier quoted context omitted.

And it is severely underrated. Even though performance gain is aevrate around 4x-20x. Used in production and memory usage is also about 1/6th of CPython. Can get 10x perfromance easily in many cases.

> Used in production and memory usage is also about 1/6th of CPython I thought it would have higher memory usage? (based only on reading)

No, it has drastically less memory requirements. It's very similar to my perl compiler, and even in non-optimizing mode it uses much less memory. In optimizing mode it's almost the same as this one. Just ~20 years older.

Re: Python-based compiler achieves orders-of-magnitude speedups

#192
post #183
post #182

Earlier quoted context omitted.

For sure, but django for instance is really good at turning something that ought to be one query into N+1 queries.

how do you deal with this?

In my experience? optimize things once it turns out to be a problem. It's not easy though and one of the many reasons I don't love the django ORM.

Re: Python-based compiler achieves orders-of-magnitude speedups

#193

Earlier quoted context omitted.

What is this talk about "rescuing" Python performance? Python does not need to be rescued. Its fast enough. For 90% of applications, you are kidding yourself if you need more speed. These are enhancements on Python, where you want to run stuff even faster on par with other languages.

Python is currently running on 100,000s of CPUs right now. There's an environmental cost to that. Moreover, people have huge python apps that they can't just rewrite and python just isn't fast enough. This has happened so many times. So many man hours have been spent optimizing python code, that we have over a dozen different implementations in just this thread alone and it doesn't include 3 that I know of. Python's…

Python is a scripting language. It allows me to develop a right answer in record devopment time and with a high degree of confidence that the result does what it needs to do. If, then, there are speed problems then I can optimise my existing code or rewrite sections in other languages, but crucially use my initial code to aid in testing the more obscure rewrites. Most of the time, some thought upfront will tell you if you will need a compiled solution early on, but even then - getting it correct in Python before getting it fast in something like C++ can be faster - the spec is often revised as implementation can change specsand Python is more agile.

Execution speed is more than execution speed - you need to be correct, and being fast enough is quality; faster may be wasteful.

Post reply on HN