Optimisation

For Debug builds:
in osx we default to /O2
in vs2010 we default to /O0

this may be because vs needs /O0 in order to debug, whereas xcode will ‘debug’ at /O2

I personally prefer /O0 for debug builds as it makes debugging much more sensible (especially for new users who have no idea why a certain line might be missing from the code even though they see it on their screen, or why a variable has been ‘optimised away by compiler’).

But conversely, it would make oF much slower in debug mode for gcc, and most users would not switch to Release to get the extra speed.

I think it’s worth reviewing these options for a later release.

So maybe (for gcc:)

Debug (/O0)
Testing (/O2 with debug symbols) default
Release (/O2 without debug symbols)
ReleaseSpeed* (/O2 define a flag to turn off all checks)

*a flag to remove checks, e.g. you’d never see an ofLogError message, you’d just crash

now don’t be scared! i’m not strictly suggesting 4 or more build options
but perhaps the usual Debug/Release arrangement could be reconsidered :slight_smile:

I’ve also got a copy of Intel C++ compiler at the moment and have built my opencv, openFrameworks, ofxGraycode, ofxCv, ofxCvGui2, ofxUeye libs in it.
Be interested to do a speed test vs gcc as it’s not really fair to pitch it against vc++
I imagine in the core ofPixels operations are going to be particularly improved, whereas ofMesh probably wouldn’t be so different

that’s weird, i think debug should be O0, O2 for debugging will even optimize out some variable values making it hard to debug some problems. can you add an issue in github?