Went from like 6-9% cpu usage in debug to 1% in release or less was super excited just wondering what level you all do for your releases.
I would stick to -O3, AUO can cause all kinds of issues that will end up being impossible to debug, and will vary massively compiler to compiler and platform to platform.
Yeah I thought so I will try it out maybe same results because from none to at least some optimization
I’m probably dumb, but what do you mean by aggressive unsafe optimizations?
Oh I think I misread it’s “Ofast” nothing about unsafe but just there is option for safe
In the projucer
I use O3 and append other flags explicitly (like ffast-math) after thinking twice.
Yes just reading about all these now don’t want to lose ability to check isnan or isinf but I don’t think that’s the case.
If you use -ffast-math & -O1 … -O3 you will lose isnan, isinf and fpclassify on newer versions of clang/gcc.
It happened to me on macOS when I switched to Xcode 14.
However, it is easy to just roll your own isinf/isnan based on bitmasks.
I strongly dislike this change in clang as it can break handling data that comes from sources outside the current compilation unit.
At least there is now some warning during compilation.
check it out here on godbolt:
Thank you for this. Do you know if it’s possible to enable something like this in Xcode . Or view the compilation log ?

