.:: Bots United ::.

.:: Bots United ::. (http://forums.bots-united.com/index.php)
-   YaPB (http://forums.bots-united.com/forumdisplay.php?f=55)
-   -   Recommended GCC/Clang opt flags? (http://forums.bots-united.com/showthread.php?t=10058)

RoboCop 02-06-2017 02:15

Recommended GCC/Clang opt flags?
 
Well I did some tests on the latest YaPB but it appears YaPB v2.8.4670 isn't stable for CS 1.6 compared to the final build for v2.7. I did some research even though I have not got the long-term experience on using the safe, moderate but faster optimisation flags. Bare in mind that this is only a suggestion:-

GCC Optimisation Flag Blacklist:-
-O3 -Ofast -Os -funroll-loops -funroll-all-loops -ffast-math -ffunction-sections -fdata-sections

GCC Optimisation Flag Whitelist:-
-mtune=i686 -march=pentium4 -mmmx -msse -msse2 -O2 -m32 -mfpmath=sse -finline-functions -pipe

I don't think that using like -O3 and -Ofast are as good as -O2 as it appears to be safer as well not compile a excessive larger .so build.

The Storm 04-06-2017 02:36

Re: Recommended GCC/Clang opt flags?
 
The blacklisted flags that you mentions are not danger at all if the code is written properly. I mean that these flags are doing more aggressive optimizations(but nothing illegal). The real problem is that most of the time there is code that is relying on the so called "undefined behavior" that can produce different results with -O2 and -O3. That is why it is called "undefined" but rarely the developers respect that... :)


All times are GMT +2. The time now is 02:39.

Powered by vBulletin® Version 3.8.2
Copyright ©2000 - 2018, Jelsoft Enterprises Ltd.