System Performance Playground

Task: Heavy Calculation (Fibonacci 45)
Rust (v1.75)
1
2
3
4
5
6
7
8
9
10
fn main() {
    let n = 45;
    let result = fibonacci(n);
    println!("Result: {}", result);
}

fn fibonacci(n: u32) -> u32 {
    if n <= 1 { return n; }
    fibonacci(n - 1) + fibonacci(n - 2)
}
Terminal Output
4.2s
$ cargo run --release
Compiling playground v0.1.0...
Finished release [optimized] target(s) in 0.82s
Running `target/release/playground`
Result: 1134903170
Execution Time: 4,210ms
C (GCC 13.2)
1
2
3
4
5
6
7
8
9
10
#include <stdio.h>

int fib(int n) {
    if (n <= 1) return n;
    return fib(n-1) + fib(n-2);
}

int main() {
    printf("%d\n", fib(45));
    return 0;
}
Terminal Output
4.4s
$ gcc -O3 main.c -o main
Generating optimized binary...
./main
1134903170

Execution Time: 4,452ms
Python (3.12)
1
2
3
4
5
6
7
8
9
10
def fibonacci(n):
    if n <= 1:
        return n
    return fibonacci(n - 1) + fibonacci(n - 2)

result = fibonacci(45)
print(f"Result: {result}")
Terminal Output
...Running
$ python3 main.py
Executing script...

[Calculation in progress - Global Interpreter Lock active]

Estimated Time: ~285,000ms
Memory Peak
2.4 MB Rust Safe Allocation
CPU Cycles (Total)
1.2G User Space Only
Cache Miss Rate
0.02% Optimized L3 Hits
Compiler Choice
LLVM Backend
bolt