Giovanni Bajo wrote:
If -O1 means "optimize, but be fast", what does -O2 mean? And what does -O3 mean? If -O2 means "the current set of optimizer that we put in -O2", that's unsatisfying for me.
Right, that's exactly my point, you want some clear statement of the goals of different levels, defining -On as merely being better performance than -O(n+1) at the expense of worse compile time is really not sufficient. With large applications, it is often a big job to test out different optimization levels, so this is not always the practical way of choosing.