Hacker News new | ask | show | jobs
by karmakaze 2228 days ago
How is it that Python is able to do so many things quickly (even excluding NumPy/SciPy)? Is it more native code libraries? Could Ruby follow this path as effectively?
5 comments

In general these days, Python "general purpose" code is about as fast/slow as Ruby. And yes, everything that does heavy lifting has native extensions underneath.
Most of the production Python code is not actually Python; the language itself is often a proxy to C libraries with a pleasing syntax.
Eric Raymond wrote about this, in relation to his reposurgeon project, here:

http://esr.ibiblio.org/?p=8161

Basically, what he found is that for programs that work with large graphs of objects (as opposed to arrays of numbers, which are the domain of numpy and friends), Python isn't all that fast. I don't know how it compares to Ruby though.

Is Python is able to do so many things quickly?

https://benchmarksgame-team.pages.debian.net/benchmarksgame/...

Are the Python web frameworks that much faster?
I wasn't specifically thinking web frameworks but a number of projects that I found surprising and performant. One example I can recall is Graphite (Whisper, Carbon).