C++ and the -O3 compilation flag

So its 2018, are we adding the O3 compiler option ?

I didn’t even know the #pragma GCC optimize "O3,omit-frame-pointer,inline" was a thing until @MadKnight told me about it.

As someone who heavily uses STL (vectors, map, set, etc), I realized that I was actually doing the worst thing possible. I honestly think not having the O3 flag is just bad for all C++ programmers.

I think adding it as a separate language is too much. Maybe a simple checkbox that says Enable Compiler Optimization would be a really good idea.

4 Likes