[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Help-glpk] Tuning gcc compiled code with -mfpmath=both

From: Xypron
Subject: [Help-glpk] Tuning gcc compiled code with -mfpmath=both
Date: Tue, 18 Dec 2012 22:10:32 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:10.0.10) Gecko/20121027 Icedove/10.0.10

When compiling GLPK with GCC on a x86 architecture a performance gain of 20 % can be gained by compiling with option -mfpmath=both.
This requires SSE to be enabled. This is default for the x86-64
compiler. For the 32bit compiler SSE has to be enabled by either of -march=<cpu-type>, -msse, or -msse2.

-mfpmath=both allows both the FPU and the SSE registers to be
used. See

Hence I would compile GLPK with:

export CFLAGS="-march=native -O3 -pipe -mfpmath=both"
./configure --enable-dl --enable-mysql --enable-odbc
make -j8
make check
sudo make install

-march=native implies that the code may not be used on different CPUs.
-pipe reduces compile time by using pipes instead of files
-j8 reduces compile time by parallelization

Best regards

Heinrich Schuchardt

reply via email to

[Prev in Thread] Current Thread [Next in Thread]