Skip to content
Prev 44741 / 63421 Next

How to ensure -O3 on Win64

On 28/12/2012 00:41, Simon Urbanek wrote:
Compilation with -O3 was not stable, including that some commonly-used 
packages segfaulted.  x64 Windows is still an under-development platform 
for gcc, and a number of issues will not be resolved until at least gcc 
4.8.0.

And BTW, -O3 is not the out-of-the-box default for any R build except 
i386 Windows, including not for the OS X binary packages.  Not sure why 
you are singling out Windows here ....

It isn't just a question of optimization level but also what optimizing 
options the compiler is built with.  We had to discard all the versions 
of gcc 4.6.x built with Graphite optimization as they produced far too 
unstable code on Windows.
Remember that even if -O3 works on your package with the current 
compiler, it may not with another one.   One reason we update the 
recommended Windows compiler so infrequently is dealing with all the 
fallout from packages which break (almost always because of previously 
unrevealed errors in their code). But, for example, we will consider if 
we want to change the recommended compiler for R 3.0.0 and it is likely 
we will change it during 2013.