MN://WORK/language-benchmarks
OU Benchmark
A methodology-fixed Ornstein–Uhlenbeck benchmark across C, Zig, Rust, Swift, V and TypeScript on Bun, with the same algorithm and checksum in every language.
- Zig
- Rust
- C
- Swift
- MIT
$ trace "language-benchmarks"
- fixed method
- six languages
- timed runs
- ranked table
The problem
Language benchmarks usually compare different programs, so the result measures the author more than the language.
The constraint
The methodology has to be fixed across every language, and the compiler must not be allowed to delete the work as dead code.
The approach
The same Ornstein-Uhlenbeck simulation in C, Zig, Rust, Swift, V and TypeScript on Bun: Marsaglia polar Gaussian generation, Euler-Maruyama integration, and a final checksum that prevents dead-store elimination.
The outcome
A published results table with average, median, minimum and maximum times on an Apple M4 Pro, under MIT, so the numbers can be reproduced and disputed.
Next route
Open another project
The index is the wider system.