1 Billion nested loop iterations
Naïve Fibonacci
Methodology
Ran each three times and used the lowest timing for each.
Timings taken on an M3 Macbook pro with 16 gb RAM using the /usr/bin/time command.
Input value of 40 given to each.
- Clang version: Apple clang version 16.0.0 (clang-1600.0.26.4)
- R version: Rscript (R) version 4.4.2 (2024-10-31)
- Kotlin version: kotlinc-jvm 2.0.21 (JRE 23.0.1)
- Java version: javac 23.0.1
- Rust version: cargo 1.82.0
- Node version: v22.11.0
- Python version: 3.9.6
- Ruby version: 3.3.5
- PHP version: 8.3.13
- Dart version: 3.5.4
- Bun version: 1.1.34
- Deno version: 2.0.6
- Go version: 1.21.2
- PyPy: 7.3.17
Code
You can find all of the code and the compile / run / cleanup scripts at the GitHub repository.