|
|
|
|
|
by paulddraper
2433 days ago
|
|
FMA isn't a safe optimization as it can give different results. C++ compilers have flags to enable it globally. gcc and clang include the optimization in -Ofast. Rust allows you to choose at a code level (but usually people don't know about it). Perhaps it should also have a global fast-math flag that would automatically optimize it. Pros and cons to that. |
|
GCC emits FMA instructions at -O2 without -ffast-math.