3 ms·
Python manages to have decent performance because NumPy uses an APL-like model and it happens to skirt the design flaws (dynamic typing, interpreted). J for ins
by vmchale 3y ago
Python manages to have decent performance because NumPy uses an APL-like model and it happens to skirt the design flaws (dynamic typing, interpreted). J for instance has a tree-walking interpreter written in C that performs well!
Ruby's poor performance hobbles it even in places it's supposed to be good (twitter was rewritten to Scala over rails).
- cutler 3y agoRuby 3.2.2 is slightly faster than Python 3.11 in quite a few benchmarks. I don't know what data you used to conclude that Python is faster than Ruby unless you're comparing something like Numpy and a Ruby lib which isn't exactly Apples to Apples.
- Mawr 3y agoThe original question is "why python won". That in 2023 Ruby is 1% faster than Python is irrelevant. Historically, Python has always been faster than Ruby. That certainly didn't help Ruby gain ground over Python.
- lnalx 3y ago> Ruby's poor performance hobbles it even in places it's supposed to be good (twitter was rewritten to Scala over rails). All performances are relative. Ruby or Python is very performant for 99% of websites, generally the bottleneck is the database. Rails has enabled Twitter to develop and iterate faster. But now that the social network has to manage several tens of millions of users, the 200 req/s of Rails are no longer sufficient. And Ruby in 2013 didn't have the same performance as in 2023. Hardware no longer had the same performance, too. (https://blog.twitter.com/engineering/en_us/a/2013/new-tweets-per-second-record-and-how https://blog.twitter.com/engineering/en_us/a/2013/new-tweets...)