Hacker News new | ask | show | jobs
by donretag 2228 days ago
Basically do not use Ruby
2 comments

Yes, Ruby is meant to be easy and magical, but it was never meant to be fast. It's fast enough for most things, but you also wouldn't show up to a drag race with a tuned bicycle.
https://crystal-lang.org/ almost the same as ruby. Blazing fast.
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?
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).