Sharkbench

Benchmarking programming languages and web frameworks

Computation

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.
Language
Time
Memory
Rust
1.05 s
376.0 KB
C (GCC)
1.23 s
348.0 KB
Swift
1.34 s
3.0 MB
Julia
1.53 s
164.6 MB
Java (Temurin)
1.63 s
20.2 MB
Go
1.70 s
2.5 MB
JavaScript (Node.js)
1.93 s
10.6 MB
JavaScript (Bun)
1.94 s
12.8 MB
Dart (JIT)
2.02 s
99.1 MB
Java (Semeru)
2.03 s
18.8 MB
Dart (AOT)
2.10 s
2.3 MB
C# (.NET)
2.53 s
9.7 MB
Ruby (JIT)
48.24 s
10.5 MB
Ruby
106.77 s
10.5 MB
Python
126.53 s
13.6 MB

© 2024 Tien Do Nam