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. Python is designed with an emphasis on code readability and simplicity, making it an excellent choice for beginners and experienced programmers alike. Python's extensive standard library and large ecosystem of third-party packages, such as NumPy for numerical computations and Django for web development, make it incredibly versatile. This versatility allows Python to be used in a variety of domains, from web development and data analysis to artificial intelligence and scientific computing. Python is also notable for its use in educational settings due to its clear syntax and gradual learning curve.

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.
Language
Time
Memory
Python v3.12
126.53 s
13.6 MB
Python v3.11
118.43 s
12.9 MB
Python v3.10
133.23 s
11.0 MB
Python v3.9
146.89 s
11.6 MB
Python v3.8
141.56 s
11.1 MB
Python v3.7
132.97 s
11.5 MB
Python v3.6
118.87 s
11.1 MB

© 2024 Tien Do Nam