Sharkbench

Benchmarking programming languages and web frameworks

Python Computation Benchmark

About Python

Paradigm

Object-Oriented, Imperative, Functional

Execution

Interpreted

Typing

Dynamic

Null Safety

NO

Memory Management

Garbage Collection

Python is a high-level, interpreted programming language known for its simplicity and readability with an emphasis on code clarity. It has an extensive standard library and large ecosystem of third-party packages for various domains. Python is used in web development, data analysis, artificial intelligence, and scientific computing, and is popular in educational settings.

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
4.49 s
63.8 MB
4.47 s
64.9 MB
4.54 s
63.8 MB
4.52 s
42.0 MB
2.98 s
41.5 MB
2.98 s
38.4 MB
127.69 s
16.5 MB
130.14 s
13.6 MB
101.47 s
13.3 MB
113.86 s
11.3 MB
136.34 s
10.9 MB
143.21 s
11.0 MB
123.97 s
10.8 MB
116.89 s
11.3 MB

Popular languages

How does Python 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
4.49 s
63.8 MB
83.69 s
6.8 MB
127.69 s
16.5 MB

© 2025 Tien Do Nam