Programming-Language-Benchmarks icon indicating copy to clipboard operation
Programming-Language-Benchmarks copied to clipboard

Why @setFloatMode(.Optimized) is allowed for Zig?

Open bpecsek opened this issue 4 years ago • 1 comments

Could you please explain why @setFloatMode(.Optimized) is allowed for zig in spectralnorm code? As far as I know this is “equivalent” to -ffast-math in GCC yet quite rightfully -ffast-math is not allowed for gcc.

bpecsek avatar Feb 10 '22 10:02 bpecsek

You are right. https://ziglang.org/documentation/master/#setFloatMode It is should be:

  1. removed from Zig implementations or
  2. allowed to add fast-math to others.

Similar problem with Zig's Vector. It uses SIMD inside..https://github.com/hanabi1224/Programming-Language-Benchmarks/issues/316 At least those implementations should be marked with "-I" flag.

cyrusmsk avatar Dec 26 '22 09:12 cyrusmsk