Remix.run Logo
bluGill an hour ago

Most people use -O2 and so if you use -O3 you risk some bug in the optimizer that nobody else noticed yet. -O2 is less likely to have problems.

In my experience a team of 200 developers will see 1 compiler bug affect them every 10 years. This isn't scientific, but it is a good rule of thumb and may put the above in perspective.

macintux 35 minutes ago | parent [-]

Would you say that bug estimate is when using -O2 or -O3?

bluGill 25 minutes ago | parent [-]

The estimate includes visual studio, and other compilers that are not open source for whatever optimization options we were using at the time. As such your question doesn't make sense (not that it is bad, but it doesn't make sense).

In the case of open source compilers the bug was generally fixed upstream and we just needed to get on a newer release.