From 7653aa8747f55e6522bc4cdfa343c1ef93e7571f Mon Sep 17 00:00:00 2001 From: Frank Dellaert Date: Mon, 18 Jan 2010 16:13:07 +0000 Subject: [PATCH] I changed myconfigure to ./configure --prefix=$HOME --with-toolbox=$HOME/toolbox/ --with-boost=/opt/local/include/ CXXFLAGS=" -pipe -g -O2 -march=core2 -DNDEBUG" --disable-static based on reading From http://www.gentoo.org/doc/en/gcc-optimization.xml, including: -O2: A step up from -O1. This is the recommended level of optimization unless you have special needs. -O2 will activate a few more flags in addition to the ones activated by -O1. With -O2, the compiler will attempt to increase code performance without compromising on size, and without taking too much compilation time. -O3: This is the highest level of optimization possible, and also the riskiest. It will take a longer time to compile your code with this option, and in fact it should not be used system-wide with gcc 4.x. The behavior of gcc has changed significantly since version 3.x. In 3.x, -O3 has been shown to lead to marginally faster execution times over -O2, but this is no longer the case with gcc 4.x. Compiling all your packages with -O3 will result in larger binaries that require more memory, and will significantly increase the odds of compilation failure or unexpected program behavior (including errors). The downsides outweigh the benefits; remember the principle of diminishing returns. Using -O3 is not recommended for gcc 4.x. --- myconfigure | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/myconfigure b/myconfigure index cf903c101..e51d3d0fd 100755 --- a/myconfigure +++ b/myconfigure @@ -1,4 +1 @@ -./configure --prefix=$HOME --with-toolbox=$HOME/toolbox/ --with-boost=/opt/local/include/ - -# for maximum performance on Intel Core2 platform: -#./configure --prefix=$HOME --with-toolbox=$HOME/toolbox/ --with-boost=/opt/local/include/ CXXFLAGS=" -g -O3 -ftree-vectorizer-verbose=2 -march=core2 -DNDEBUG" --disable-static \ No newline at end of file +./configure --prefix=$HOME --with-toolbox=$HOME/toolbox/ --with-boost=/opt/local/include/ CXXFLAGS=" -g -O2 -march=core2 -DNDEBUG" --disable-static