Ruby has a JIT. Python doesn't. Until it does, its performance is fundamentally capped by it.
Ruby has two viable alternative runtimes, one that sees a lot of production usage (jruby) and another one which can run the same code as CRuby (truffleruby). Both do not have a GIL. Both have multi-tier JITs, and a huge upside. Most of the ecosystem is known to test compatibility with jruby, and the effort to do the same with truffleruby is well underway.
Compare that with python, where not running Cpython comes with a lot of asterisks, mostly because the ML ecosystem that brought it to massive popularity can only run in Cpython.
Ruby has overall more upside.
I got triggered by this because a lot of people put a lot of effort into making this release happen. Don't take away their "wind" by asking veiled questions that hint that other languages are good, especially as this submission is just an announcement and does not make any comparision between Ruby and other languages.
It is ok if you like Python more than Ruby. There is a place for everyone, and I wish people would adopt the mindset of "growing a pie" and not act like every release of any other language is a direct hit to their own choice.
About speed, I would say this:
- if you are creating a project with speed as the primary business value, then yes, don't choose Ruby. Choose C or Crystal
- if your project is a web app, then it does not matter if you choose Python or Ruby
- rarely a project that has speed a core business value dies out because it is slow. So from a business perspective, the criterium of speed is irrelevant.
as per speed, ruby 3.2 is 10% faster than 3.1 on shopify infra.
Ruby was fast enough for me to do what I needed with it already in the 1.8.x days. Every improvements since is gravy.
A handful of times over the last 16 years or so I've needed to dip into C extensions for the performance I needed; but in those instances Python wouldn't even remotely cut it either.
I will list some crap that is mine, and my personal view. not an expert on python, not a programmer designer. I'm 100% convince that alternative exist, or im complete an fool.
- self when writing oop/camelCase vs snake_casse others even better CamelCase_V1_magic_action
- classes with lower cases / strange names
- hundreds of lines of code per functions/ if/else/ etc. open sqlalqhemy and have a look
- if you want async/away you need to colorise your function
- __private__
- len/str, that is basically __len__ __str__
- package management
- map/select/fold/ dont exists. just use [x in y for x in list]
- := strange go var inside of if, that only work there
- if you dont return from a function, then, what the function will return?
a lot of web frameworks, that either copy(rails, sinatra, nextjs)
- a lot of junior developers, with junior code or show to us code
- python is basically a glue lang for c/c++ libraries
- complicated deployment.
- version management also a mess
- cyclic import exception. it sucks. i know im at fault but is tsucks
- people tend to write criple code, because python is easy. I think is a mistake.
- asyncio is hard. but again my view here :) looks easy on js
- I dislike decorators.
- i dislike multiple inheritance :)
- the str format demo.format vs f"{format}" vs whatever else
end of random rants :)
The feeling is like speaking to someone with a stutter or walking in a room filled with things to slightly stub your toe onto.
Slow bottlenecking gems? Replace them with new rust native gems as of 3.2