nbabel
nbabel copied to clipboard
Impact of fastmath?
Thanks for producing these benchmarks, it's great to see these comparisons made. I was wondering about the impact of fastmath
, this seems to be enabled here for Fortran
:
https://github.com/paugier/nbabel/blob/e68441a717bd984f712938299b092d9f63431272/fortran/Makefile#L11 and here for C++:
https://github.com/paugier/nbabel/blob/e68441a717bd984f712938299b092d9f63431272/cpp/Makefile#L17
and transonic/pythran here:
https://github.com/paugier/nbabel/blob/e68441a717bd984f712938299b092d9f63431272/py/Makefile#L30
Does removing this flag from the above, or indeed adding it to Julia, Rust and Numba change the results?
Thanks for the interest and the remark. Indeed fastmath
has an effect. I added it for Numba in https://github.com/paugier/nbabel/commit/bfe5e3a077acf91a6e42f8b6dffa8c4d0ea0598f
Beware that fastmath doesn't guarantee IEEE compliance and may impact the numerical quality of the results. I would advise not to use it.
fastmath
was used when possible for the different implementations. So it's kind of fair. We could also choose to disable it for all implementations.