🌐
Medium
medium.com › @vishalsadriya1224 › performance-comparison-ruby-vs-python-vs-go-counting-character-occurrences-e824b5918106
Performance Comparison: Ruby vs. Python vs. Go — Counting Character Occurrences | by Vishal Sadriya | Medium
January 15, 2024 - Ruby: Ruby is an interpreted language, which generally has a higher runtime compared to compiled languages. Python: Python has better runtime performance than Ruby but still falls behind Go.
🌐
Ruby-Doc.org
ruby-doc.org › home › ruby vs python – a comprehensive comparison for developers
Ruby vs Python - A Comprehensive Comparison for Developers - Ruby-Doc.org
July 11, 2025 - YJIT (a JIT compiler by Shopify) ... Verdict: Python generally has better performance for computational tasks, while Ruby is optimized for developer productivity and fast iteration cycles in web applications....
Discussions

Is ruby really slow?
There's async I/O. Here's a library that leans on Ruby 3's fiber scheduler. You need to consider that "slow" in terms of computers is still blindingly fast. Go ahead and run some operation a million times. Time it. Now try it in C. You might find that Ruby takes (just an example) 4 seconds, and C takes 3.5. That's a 0.0000005 second difference per operation. Do you care? You shouldn't. If you're somewhat new to programming, learning about time complexity will save you way more cycles than choosing a different programming language. There's also more to performance than speed. Learn about memory complexity too; C stomps Ruby in this regard. But once again, mind your use case. Do you need to care? Unless you're developing for a weak handheld with only a few megabytes of RAM (I say this with caution because you can write Switch games in Ruby with no problems), or you're developing a massive piece of software that's gonna eat RAM and you want to minimize the hardware requirements, language choice isn't going to make or break you. 3+ GHz is SO FAST. 8+ GB of memory is SO MUCH. By the time you need to start worrying about these limits, you will likely know several languages anyway. What Ruby provides is a syntax and API that are an absolute joy to work with. The tradeoff is usually a few millionths of a second for your entire app to run. They can keep 'em. More on reddit.com
🌐 r/ruby
21
0
April 22, 2023
Why is Python faster than Ruby? - Stack Overflow
You're specifically talking about ... The performances would be vastly different for (say) Jruby and Jython or IronRuby and IronPython or Rubinius and PyPy. ... Nothing deep, I am pretty sure -- it's strictly a matter of implementation choices and maturity. Python was quite ... More on stackoverflow.com
🌐 stackoverflow.com
Comparing performance between ruby and python code - Stack Overflow
I have a memory and CPU intensive problem to solve and I need to benchmark the different solutions in ruby and python on different platforms. To do the benchmark, I need to measure the time taken ... More on stackoverflow.com
🌐 stackoverflow.com
Why Ruby is More Readable than Python
One nit. It is uncommon to see explicitly defined setters/getters in ruby. attr_accessor :title Is the common idiom. More on reddit.com
🌐 r/ruby
92
41
July 18, 2022
🌐
Programming Language Benchmarks
programming-language-benchmarks.vercel.app › python-vs-ruby
Python VS Ruby benchmarks, Which programming language or compiler is faster
Python · Ruby · Rust · Swift · Typescript · V · Wasm · Zig · Current benchmark data was generated on Fri Aug 01 2025, full log can be found HERE · CONTRIBUTIONS are WELCOME! CPU INFO:[x86_64][4 cores] AMD EPYC 7763 64-Core Processor (Model 1) * -m in a file name stands for multi-threading or multi-processing ·
🌐
UpGuard
upguard.com › blog › python-vs-ruby
Ruby vs Python: Comparing Languages | UpGuard
January 9, 2025 - There is a perception that Python ... Ruby has gotten way faster over the years. Now, in benchmarks, Ruby performs just about as well as Python, if not better....
🌐
Reddit
reddit.com › r/ruby › is ruby really slow?
r/ruby on Reddit: Is ruby really slow?
April 22, 2023 -

Many people say ruby is slow. Any plans for asynchrony ruby? Or faster ruby?

Top answer
1 of 5
16
There's async I/O. Here's a library that leans on Ruby 3's fiber scheduler. You need to consider that "slow" in terms of computers is still blindingly fast. Go ahead and run some operation a million times. Time it. Now try it in C. You might find that Ruby takes (just an example) 4 seconds, and C takes 3.5. That's a 0.0000005 second difference per operation. Do you care? You shouldn't. If you're somewhat new to programming, learning about time complexity will save you way more cycles than choosing a different programming language. There's also more to performance than speed. Learn about memory complexity too; C stomps Ruby in this regard. But once again, mind your use case. Do you need to care? Unless you're developing for a weak handheld with only a few megabytes of RAM (I say this with caution because you can write Switch games in Ruby with no problems), or you're developing a massive piece of software that's gonna eat RAM and you want to minimize the hardware requirements, language choice isn't going to make or break you. 3+ GHz is SO FAST. 8+ GB of memory is SO MUCH. By the time you need to start worrying about these limits, you will likely know several languages anyway. What Ruby provides is a syntax and API that are an absolute joy to work with. The tradeoff is usually a few millionths of a second for your entire app to run. They can keep 'em.
2 of 5
15
Compared to compile languages, yes. Compared to other interpreted languages, no. Ruby is pretty fast for a dynamic, reflective language. For instance it is faster than Python. However it is not as fast as JavaScript, for which we can largely thank the deep pockets of Google.
🌐
Quora
quora.com › How-fast-is-Ruby-compared-to-Python
How fast is Ruby compared to Python? - Quora
For numeric-heavy or tight inner ... Python frequently wins because of mature C extensions (NumPy, Cython) and JIT-capable implementations (PyPy), but Ruby can perform similarly when using native extensions or TruffleRuby...
🌐
Hacker News
news.ycombinator.com › item
So with the promised 3x speed improvement (hooray!), where does Ruby stand with ... | Hacker News
January 2, 2021 - Looking into it, this other benchmark [2] of 3.0.0-preview1 vs Ruby 2.7 actually concludes there's no real performance improvement there. So I guess an additional question is, is there actually a 3x speed increase in realistic benchmarks · In my experience Ruby has been faster than Python ...
Find elsewhere
🌐
JayDevs
jaydevs.com › ruby-vs-python
Ruby vs. Python: Which Language Will Power Your Project in 2024? - JD
November 11, 2025 - Ruby is often perceived as having fewer helpful tools for scalability-related tasks. As a result, developers may require more time to make a web app that can handle increasing workloads. However, Ruby’s runtime performance is generally twice as fast, as indicated by the Ruby vs Python benchmark.
🌐
EDUCBA
educba.com › home › software development › software development tutorials › top differences tutorial › python vs ruby performance
Python vs Ruby Performance | Which Language is Better & Faster
March 3, 2023 - With Ruby, one can write concurrent programs that operate on multiple cores easily; similar to Python, a developer is responsible for side effects and isolation issues. Python’s concurrency process is more resource-demanding as compared to Ruby. But then again, it boils down to developer coding habits if one has to take the cake offered by both Python and Ruby Performance languages.
Address   Unit no. 202, Jay Antariksh Bldg, Makwana Road, Marol, Andheri (East),, 400059, Mumbai
🌐
Wildnet Edge
wildnetedge.com › home › ruby vs python: which programming language is better in 2026?
Ruby vs Python: Which Programming Language is Better in 2026?
3 days ago - Performance benchmarks in 2026 indicate that both languages have made significant strides in execution speed through Just-In-Time (JIT) compilation, though Python generally offers a more extensive library ecosystem.
🌐
Golden Owl
goldenowl.asia › home › blog › ruby vs python: a side-by-side comparison of features and performance (2024)
Ruby vs Python: A Side-by-Side Comparison of Features and Performance (2024) - Golden Owl
Therefore, when comparing Ruby ... but more flexible and portable. However, the performance of Ruby and Python can vary depending on the implementation, environment, and task....
🌐
DEV Community
dev.to › stokry › performance-comparison-between-python-and-ruby-49a9
Performance Comparison between Python and Ruby - DEV Community
July 27, 2023 - Ruby has a similar syntax to Python and is known for its easy-to-read code. When it comes to performance, Ruby tends to be slower than Python. Ruby's performance is due to its lack of efficient memory management and slow execution speed.
Top answer
1 of 6
26

Nothing deep, I am pretty sure -- it's strictly a matter of implementation choices and maturity. Python was quite a bit slower in many aspects not so long ago, after all! Consider for example:

$ py24 -mtimeit '[i+i for i in xrange(55)]'
100000 loops, best of 3: 10.8 usec per loop
$ py25 -mtimeit '[i+i for i in xrange(55)]'
100000 loops, best of 3: 9.83 usec per loop
$ py26 -mtimeit '[i+i for i in xrange(55)]'
100000 loops, best of 3: 8.12 usec per loop
$ py27 -mtimeit '[i+i for i in xrange(55)]'
100000 loops, best of 3: 6.35 usec per loop

Yep, all on the same machine (Macbook Pro, 2.4 GHz Intel Core 2 Duo, OSX 10.5), all "official" Mac releases from python.org (latest one of each x in the 2.x series). I have no 2.3 around to check, but I'd expect it to be a wee bit slower than 2.4.

This is just the kinds of speed-up that a lot of loving, painstaking work can achieve among successive releases of pretty much the same underlying architecture. Not as flashy as adding feechurz, but often vastly more useful in the real world!-)

I'm pretty sure, therefore, that Ruby can also stabilize on a sound, performance-robust underlying architecture, then start getting a steady stream of under-the-hood performance tweaks over the years to get (e.g.) the 40% or so further improvement we observe here has been happening in (at least some parts of) Python in the last few years.

2 of 6
21

One reason is Python's being compiled into bytecode which is then executed by a highly optimized VM. AFAIK Ruby doesn't work this way in 1.8 and earlier - but interprets the trees on the fly.

Think of it this way:

Python:

  1. Parse code into ASTs
  2. Convert ASTs into bytecode
  3. Run bytecode on a VM

Ruby (prior to 1.9):

  1. Parse code into ASTs
  2. Interpret the ASTs directly by recursive traversal

Without getting too much into detail, step 2 in the old Ruby has a lot of repetitions because it has to "understand" the ASTs each time it sees them (which, in an inner loop is a lot). Python "understands" the ASTs only once, and then the VM runs the bytecode as fast as it can (which isn't different in principle from the way the Java and .NET VMs work).

Ruby 1.9 moved to YARV, which is also a VM-based approach. Ruby 1.9 is faster than 1.8. Here's a quote from the creator of YARV, Koichi Sasada:

At first, YARV is simple stack machine which run pseudo sequential instructions. Old interpreter (matzruby) traverses abstract syntax tree (AST) naively. Obviously it's slow. YARV compile that AST to YARV bytecode and run it.

An interesting point to note is that the Python VM is also stack based, just like YARV.

🌐
NIX United
nix-united.com › home › blog › python vs. ruby: which is better for your project
Ruby vs. Python: Which is Better for Your Project – NIX United
December 17, 2020 - Python defeated Ruby in 7 out of 9 performance tests. However, this is without considering the hardware resources that each language took for processing.
🌐
E luminous Technologies
eluminoustechnologies.com › blog › ruby-vs-python
Ruby vs Python: Comparison, Differences & What to Choose?
February 6, 2026 - On the other hand, Python is generally faster than Ruby and is optimized for performance, particularly in data-heavy tasks. Python’s efficiency shines in fields like data science, machine learning, and scientific computing, where the ability ...
🌐
Netguru
netguru.com › home page › blog › python vs ruby performance: a comprehensive comparison
Python vs Ruby Performance: A Comprehensive Comparison
February 3, 2026 - When it comes to performance comparison, Python is generally considered faster than Ruby for data-intensive tasks, especially in machine learning and data science, thanks to its optimized libraries and tools.
🌐
Learn Enough
learnenough.com › blog › ruby-vs-python
Ruby vs Python: What’s The Difference & How To Choose?
January 12, 2024 - Now, I'm not ignoring the fact that Python is widely hailed as "not exactly fast", but there are more complex variables at play in the latest version. Check our Downthecrop's video to learn more. When it comes to performance, Ruby may not necessarily win in a footrace against other languages more explicitly designed for speed, like C or Rust.