Sharkbench

Benchmarking programming languages and web frameworks

Ruby Computation Benchmark

About Ruby

Paradigm

Object-Oriented, Imperative

Execution

Interpreted

Typing

Dynamic

Null Safety

NO

Memory Management

Garbage Collection

Ruby is a dynamic, open-source programming language developed by Yukihiro Matsumoto with a focus on simplicity and productivity. It has an elegant syntax designed for programmer happiness and expressive code. Ruby is commonly used for building web applications through the Ruby on Rails framework, which follows the Model-View-Controller pattern.

Benchmarks

This benchmark tests how fast a programming language can perform mathematical computations without any I/O or memory allocation. We are using the Leibniz formula to approximate the value of PI.
Please note that the memory usage also includes the memory used by the HTTP server. Ideally, the most lightweight HTTP server should be used to measure the raw memory usage of the runtime.

OS: Linux/DockerCPU: Ryzen 7 7800X3DLast Updated: 2025-05-04
Language
Time
Memory
36.94 s
6.9 MB
40.04 s
10.5 MB
46.95 s
266.2 MB
81.72 s
9.1 MB
81.85 s
9.1 MB
83.69 s
6.8 MB
80.63 s
10.5 MB
77.18 s
12.5 MB
79.73 s
9.2 MB
80.32 s
12.4 MB

Popular languages

How does Ruby compare to other languages?
Language
Time
Memory
1.00 s
22.9 MB
1.02 s
584.0 KB
1.13 s
2.1 MB
1.39 s
448.0 KB
1.41 s
9.7 MB
3.27 s
13.4 MB
36.94 s
6.9 MB
83.69 s
6.8 MB
127.69 s
16.5 MB

© 2025 Tien Do Nam