Ranter
Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
Comments
-
Hazarth95375yMost programmers don't know about compiler flags because the IDE makes it essentially invisible :( and even if theres an option for all the flags, god forbid someone googled it or explored their IDE when they don't have to -_-
-
Fakerlol855y@Ranchu Well I only ever used it with gcc, so I wouldn't know if it works with other compilers - at least with this specific flag.
I'm pretty sure that all C/++ compilers worth their name have some sort of optimization routines built in, one just has to find out how to use them.
Microsoft's has it, as you can change it through the properties of the project or with the corresponding flag (I think it was /O).
Another tidbit: When using an IDE without a makefile, usually choosing Debug-Mode will compile with O0 and choosing Release-Mode will compile with O3. You can spot this in the compilers' output :)
Related Rants
-
xjose97x19Just saw a variable in C named like this: long time_ago; //in a galaxy far away I laughed no stop.
-
Unskipp24So this happened last night... Gf: my favorite bra is not fitting me anymore Me: get a new one ? Gf: but it ...
-
sam966911Hats off to this lady .... I would have just flipped the machine
That time when I wowed all my colleagues with C++-code that executed over 2.5x faster than theirs, without changing one line of code.
I guess they didn't know what -O2 does (or that it exists, for that matter).
rant
genetic algorithm
c++
optimization
poor man's magic trick