Does ffast math flag matter - LandSandBoat/server GitHub Wiki
Does -ffast-math (/fp:fast)
matter? Should we be using it? DSP and a lot of Topaz was using it before the CMake refactor project.
It breaks IEEE compliance. Anecdotal tales of gamedev, and looking at the accuracy of float being used by the game say that this probably doesn't matter.
Test
- Log in in {Kuftal Tunnel}.
- Aggro and train the first group of crabs.
- Take them around to the left.
- Aggro the second group of crabs.
- Wait for 700-ish samples of ZoneServer tick.
Results (ZoneServer tick (ms), n=700)
metric | fastmath OFF | fastmath ON |
---|---|---|
Mean | 2.03 | 1.85 |
Median | 1.62 | 1.64 |
Mode | 1.51 | 1.34 |
σ | 2.48 | 1.25 |
Conclusion
Maybe. A larger, longer, and more varied workload would help to determine how useful the flag is. It shall stay on by default 🤷