Hacker News new | past | comments | ask | show | jobs | submit login

Python's real strength at this point is the ecosystem. If you want speed you wouldn't use Python. Having said that, its better for the planet if default Python is more efficient. Everyone has seen Python code doing stuff Python code should not do at scale.



Thanks for the information, it has never been said before in HN when an improvement to Python happens and I am sure there is still someone out there thinking that Python is fast.

BTW from the PEP:

“Motivation

Python is widely acknowledged as slow”


There are a lot of people out there who interpret "Python is a slow language" as an attack, rather than just something that engineers need to know and account for at solution time.

There are also a non-trivial number of people out there who read about the constant stream of performance improvements and end up confusing that with absolute high performance; see also the people who think Javascript JITs mean Javascript is generally at C performance, because they've consumed too many microbenchmarks where it was competitive with C on this or that task, and got 500% faster on this and 800% faster on that, and don't know that in totality it's still on the order of 10x slower than C.

It is, unfortunately, something that still needs to be pointed out.


I am more of the idea that people that truly need performance already know about the differences of Python vs C and my experience with slow Python code is almost always due to lack of basic CS knowledge rather than the language per se.

Maybe my comment was too mean, but every time that something related to Python core enhancements appears someone has to say that C is faster and I am not sure if someone interested on how the generated bytecode improves the performance needs to be reminded that C is faster.


I write a lot of code in the "Python would be really chugging here, though it would get the job done if you put a bit of elbow grease into it, but Go chows right through this no problem with no special effort" space. I'm not generally in the "keeping 100 servers 90% occupied space" but it wouldn't take much more in percentage terms for me to fall off of Python. Python's slowness is definitely real, as well as its general difficulty in keeping multiple CPUs going. (Python has a lot of solutions to this problem precisely because none of them are really all that good, compared to language that is 1. compiled and 2. has a solid threading story. It wouldn't have many solutions if one of them was an actual solution to the problem.)

It isn't just Python. I'm getting moved more into a PHP area right now, and there's a system in there that I need to analyze to see whether its performance problems are architectural, or if it's just not a task PHP should be doing and Go(/Rust/C#/Java/... Go is just the one of that set most in my and my team's toolbelt) would actually perform just fine. I don't know which it is yet, but based on what I know at the moment, both are plausible.

And I'm not a "hater". I just have a clear view of the tradeoffs involved. There are many tasks for which Python is more power than one knows what to do with. Computers have gotten pretty fast.


Last year we had a team switch from Java to Python for what should be a high-performance API, because "they're really speeding up Python 3 these days."

It's now at least 2x off its original perf target and only the trivial case is being handled correctly.

I think reminding people is good.


No need to get testy. I know its widely known. The problem is, we still see Python in performance sensitive areas at scale anyway. So I said its a good thing.

I'm not trying to give anyone a wedgy by saying that. I thought I was just giving some justification for the optimization that OP describes.


Yes we all know python is slow. But that's not a virtue of the language, it's not a feature that anyone really wants. We live with it but increasing speed is always a good thing. Which is why even Python's creator is making it his priority right now.


I want productivity and speed, it turns out that most dynamic languages learned to embrace JIT compilers, only the Python community so far has been against them, and appears to rather write C code instead.

Most attempts thus far haven't failed because it isn't possible, rather because the community hasn't railed around them.

Smalltalk, SELF, CL, Dylan, Lua have shown how it is done, Julia, JS and Ruby are following along, only Python keeps resisting it.


In practice, Python is very often fast enough. Mostly because hotspots are implemented in another language e.g., if you use Python to multiply matrices, then something like numpy would use blas (C, Fortran) or similar under the hood. Your handwritten code in any language will have a hard time to beat blas in performance.




Join us for AI Startup School this June 16-17 in San Francisco!

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: