‹ BackHN Continuity

Thread

Subnormal floating-point numbers are expensive on Intel processors

69 points · 54 comments · zdw

  1. khuey · · focus · HN ↗
    If you don't _need_ subnormals MXCSR.DAZ/FTZ (which you can get gcc to set via -mdaz-ftz) will let you ignore all of this.
    1. bee_rider · · focus · HN ↗
      IIRC intel’s compilers enable FTZ/DAZ, at least at higher optimization levels.
      1. adrian_b · · focus · HN ↗
        Which is certain to produce big errors at every instance where a subnormal result would have been generated or propagated otherwise.

        Such options exist only for games or for experts in numeric analysis, not for general-purpose programming.

Open on Hacker News to reply ↗

Unofficial Hacker News client; not affiliated with Y Combinator.