Open
Description
It seems that some benchmarks for statically compiled languages (C, Rust, Fortran etc.) heavily depends on where the instructions of fib()
function will be placed. In modern processors, which has 64-byte DSB boundaries, small loops or recursive calls may fit in a single μops cache, but it depends on the code alignment.
Here is my experiments for C benchmark:
memory address | total execution time [s] |
---|---|
0x1880 | 11.208 |
0x1890 | 11.323 |
0x18a0 | 13.320 |
0x18b0 | 10.769 |
This alignment issue causes different benchmark results on different platforms, compiler versions, compiler options (e.g. #28), or even what linker you use. If you stick with fib()
function benchmark, you should manually specify function alignment to get consistent results.
Metadata
Metadata
Assignees
Labels
No labels