Originally posted by chithanh
View Post
Announcement
Collapse
No announcement yet.
GCC Eyeing -O2 Vectorization For Boosting Intel Core / AMD Zen Performance
Collapse
X
-
-
Originally posted by chithanh View PostThe inconsistency is not really a problem of the OS, but rather of the compiler. It can be avoided using x87 FP CSR though.
The cross-gaming wasn't allowed because the companies are petty and don't trust Feral. There is no technical reason for it, and certainly nothing to do with how FP is handled on Linux, since it is identical to how it is handled on Windows.
Comment
-
Originally posted by chithanh View PostMore importantly, you get a different result depending on whether contractions are in use or not. And contractions are inserted by gcc in places where the C standard does not allow them.
Originally posted by chithanh View PostSome things that -Ofast will potentially do:- Wreak total havoc on bounds testing
Originally posted by chithanh View Post- Replace divisions with multiplicative inverse, e.g. x/y becomes x*(1/y)
- Replace literal values with operands, e.g. p*(q+1) becomes p*q+p
- Change the order of operations, e.g. (a+b)+c becomes a+(b+c), etc.
Yes, Ofast can wreck havoc on code that is specifically designed to work with IEEE float rules in the C standard. But most people don't, and a lot are not even aware of those rules or how they impact accuracy.
Comment
-
Originally posted by carewolf View PostBut the compilers do the same thing on Linux and Win32 in this case. They are more compatible with each other than they are with their own 64-bit versions.
Originally posted by carewolf View PostThe cross-gaming wasn't allowed because the companies are petty and don't trust Feral. There is no technical reason for it, and certainly nothing to do with how FP is handled on Linux, since it is identical to how it is handled on Windows.
In order to achieve this in a cross-platform game, this must be baked into the engine from the beginning. Either avoid using FP arithmetic entirely, or use cross-platform libraries which achieve this (e.g. streflop which is used by the Spring RTS engine).
A collection of accounts from developers to read if you are interested: https://gafferongames.com/post/float...t_determinism/
Originally posted by Weasel View PostIf you use floats to index arrays you need to rethink your design.
Originally posted by Weasel View PostYes, Ofast can wreck havoc on code that is specifically designed to work with IEEE float rules in the C standard. But most people don't, and a lot are not even aware of those rules or how they impact accuracy.
Comment
Comment