In this new benchmark, Fortran has the fastest matmul. You guys might want to add the Fortran version of bedcov and further optimize all the Fortran codes.
9 Likes
ifort
’s “three loops matmul” is soooo fast. But ifx
slow.
> ifx -v
ifx version 2024.0.1
> ifx matmul.f90 -O3 -march=native && time ./a.out
-143.500166666657
________________________________________________________
Executed in 1.04 secs fish external
usr time 1.04 secs 0.00 micros 1.04 secs
sys time 0.00 secs 433.00 micros 0.00 secs
> ifort -v
ifort version 2021.11.1
> ifort matmul.f90 -Ofast -march=native && time ./a.out
-143.500166666657
________________________________________________________
Executed in 217.17 millis fish external
usr time 216.92 millis 0.00 micros 216.92 millis
sys time 0.32 millis 318.00 micros 0.00 millis
Maybe ifort has been specifically optimized for matmul benchmark
2 Likes
Very interesting! It should be noted through that they do not test the matmul intrinsic function but a loop-based implementation of matrix multiplication (three nested loops) (referring to Fortran of course)