[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Help-glpk] Re: GLPK MingW build files and PyGLPK
From: |
Andrew Makhorin |
Subject: |
Re: [Help-glpk] Re: GLPK MingW build files and PyGLPK |
Date: |
Fri, 27 Nov 2009 17:50:32 +0300 |
>> Under cygwin gcc is run with default options '-g' (that includes
>> debugging info into the executable) and '-O2'. On my 32-bit windows
>> machine I build glpk using 'make CFLAGS=-O3', and the code is about
>> 30% faster than the one built with MSVS 2010 'cl -O3'.
>>
> I've experienced some issues using O3 cflag in past, but using O2 all
> looks great.
> 30% faster? Good. How you timed this? Testing some models using both
> builds (and some others, like MingW), I've seen that there is no build
> that runs all models in better time. Maybe in specific operations (like
> DB access or problem generation) it can be timed, but not in solve
> process (the longest task when reduce time become a problem).
Sorry, I was wrong. Probably my opinion was based on some inaccurate
experiments.
It is surprising to me, but the code produced with 'gcc -O2' looks to
be faster than with 'gcc -O3', though -O3 is claimed as "the third and
highest level enables even more optimizations by putting emphasis on
speed over size, that includes optimizations enabled at -O2 and
rename-register". (However, highly optimized code may overload the
instruction cache and thus slow down the CPU performance.)
Below here are solution times for dfl001.mps from netlib (solved with
the lp presolver disabled):
Cygwin GCC -O2:
Time used: 183.3 secs
Memory used: 8.1 Mb (8466625 bytes)
Cygwin GCC -O3:
Time used: 204.7 secs
Memory used: 8.1 Mb (8466625 bytes)
MSVC 10.0 -O2:
Time used: 197.5 secs
Memory used: 8.1 Mb (8466625 bytes)
> A note about GUSEK: building with cygwin the binary needs cygwin dll, a
> little big add to the package. And, if I presume that cygwin dll is as a
> system prerequisite, GUSEK will not be self-portable.
I agree with you. Since Gusek is a Windows application, using a native
executable not requiring dll is more convenient for the end-user.