4 ms·
If you believe the language benchmark game, Ruby is faster than Python on many of the microbenchmarks: https://benchmarksgame-team.pages.debian.net/benchmarksga
by maxime_cb 4y ago
If you believe the language benchmark game, Ruby is faster than Python on many of the microbenchmarks: https://benchmarksgame-team.pages.debian.net/benchmarksgame/fastest/ruby-python3.html https://benchmarksgame-team.pages.debian.net/benchmarksgame/...
And the benchmark game is using Ruby 3.1, whereas 3.2 is significantly faster. YMMV though, it is going to depend on your use case, but we are always working on making Ruby faster, and if you run into a use case where Python is a lot faster, you can ping me on twitter @Love2Code and tell me about it. We'll take a look.
- igouy 4y agofyi now ruby 3.2.0 +YJIT
- igouy 4y agoIf only someone would contribute programs that used Ractors.
- gvalkov 4y agoPython 3.11 also claims [1] to be 10-60% faster than 3.10, which is the version that the benchmarks game is using at this time. The difference in used RSS is also quite interesting in this comparison. [1]: https://docs.python.org/3/whatsnew/3.11.html#whatsnew311-faster-cpython
- igouy 4y agofyi now Python 3.11.1
- byroot 4y ago> The difference in used RSS is also quite interesting in this comparison. YJIT 3.1 was eagerly allocating it's executable memory region regardless of whether it was needed or not. With the default settings that meant an extra 256M of RSS right at boot. As mentioned in TFA that's no longer the case in 3.2, so expect this RSS number to go down by at least a good 200MB once they upgrade to 3.2.