Q++ Benchmarks¶
Cross-language benchmarks comparing Q++ against C, Rust, and Zig.
How to Run¶
From the project root:
With options:
-Runs N— Number of runs per benchmark (default: 5)-Release— Use release/optimized builds
Prerequisites¶
- Q++:
cargo build --release(compiler attarget/release/qpp.exe) - C: gcc or MSVC (
winget install mingwor Visual Studio Build Tools) - Rust:
rustc(from rustup) - Zig:
zig(from ziglang.org orwinget install zig)
Benchmarks¶
| Benchmark | Description |
|---|---|
| sum | Simple loop summing 1..100_000_000 |
| fib | Iterative Fibonacci(40) |
| sieve | Sieve of Eratosthenes, primes up to 1,000,000 |
| mandelbrot | Mandelbrot set 160x120 grid, 100 iterations max |
| nbody | 5-body simulation, 50,000 steps |
Results¶
(Run .\benchmarks\run.ps1 to populate)
| Benchmark | Quinus | C | Rust | Zig |
|---|---|---|---|---|
| sum | - | - | - | - |
| fib | - | - | - | - |
| sieve | - | - | - | - |
| mandelbrot | - | - | - | - |
| nbody | - | - | - | - |
Times are in seconds (mean ± stddev over N runs).