Microbenchmarks icon indicating copy to clipboard operation
Microbenchmarks copied to clipboard

Fortran compiler "cheating" at Fibonacci benchmark

Open MilesCranmer opened this issue 3 years ago • 2 comments

FYI the fortran compiler is "cheating" at two benchmarks: fibonacci and mandelbrot. See the latest benchmark results: https://github.com/JuliaLang/Microbenchmarks/runs/5503666442?check_suite_focus=true#step:17:25.

For Fibonacci, C gives a time of 0.021 whereas fortran gives a time of 0.000037.

For Mandelbrot, C gives a time of 0.068 whereas fortran gives a time of 0.000066.

I assume the latest fortran compiler has translated these benchmarks to analytic versions.

MilesCranmer avatar Mar 14 '22 04:03 MilesCranmer

For fib this repo may have some solutions for us: https://github.com/drujensen/fib

acxz avatar Mar 23 '22 16:03 acxz

It's usually good to feed inputs from a file or stdin to prevent specialising on benchmark constants.

KristofferC avatar Mar 23 '22 19:03 KristofferC