Proposal Raised To Deprecate "-Ofast" For The LLVM/Clang Compiler
Some that crave the absolute best possible performance sometimes build their software with the "-Ofast" optimization level that is a step above "-O3" but comes with the risk of potentially unsafe math. LLVM developers are now weighing whether to deprecate -Ofast to either remove it or have it just be an alias for the -O3 optimizations.
The -Ofast option on GCC and LLVM/Clang take -O3 but additionally tack on -ffast-math. The fast math option breaks IEEE standards compliance to increase performance. This runs the risk of potentially unsafe math around floating point operations.
Due to the non-conformant math potentially occurring and for some users the "-Ofast" option may not be aware of such risks, LLVM developers are considering whether this aggressive optimization level should be deprecated and/or just alias -O3.
James Knight with Google raised the proposal on the LLVM Discourse. So far those responding are in favor of the idea for effectively deprecating LLVM/Clang's -Ofast optimization.
The -Ofast option on GCC and LLVM/Clang take -O3 but additionally tack on -ffast-math. The fast math option breaks IEEE standards compliance to increase performance. This runs the risk of potentially unsafe math around floating point operations.
Due to the non-conformant math potentially occurring and for some users the "-Ofast" option may not be aware of such risks, LLVM developers are considering whether this aggressive optimization level should be deprecated and/or just alias -O3.
James Knight with Google raised the proposal on the LLVM Discourse. So far those responding are in favor of the idea for effectively deprecating LLVM/Clang's -Ofast optimization.
20 Comments