Sharkbench

Benchmarking programming languages and web frameworks

Rust Computation Benchmark

About Rust

Paradigm

Imperative, Functional, Concurrent

Execution

Compiled

Typing

Static

Null Safety

YES

Memory Management

Ownership System

Rust is a modern, systems-level programming language focused on safety, speed, and concurrency sponsored by Mozilla Research. Rust provides memory safety without using garbage collection, employing a unique system of ownership with rules that the compiler checks at compile time. This language is designed to create high-performance applications with a high degree of control over system resources and memory usage. Rust's rich type system and strict compile-time checks eliminate common bugs such as null pointer dereferencing and data races, making it ideal for use in everything from embedded devices to large-scale systems and complex software.

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
Rust v1.79
1.05 s
376.0 KB
Rust v1.60
1.06 s
400.0 KB
Rust v1.40
1.05 s
384.0 KB

© 2024 Tien Do Nam