[Top][All Lists]

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

Re: [Help-glpk] [Fwd: glpk optimization]

From: Jean-Jacques LOHEAC
Subject: Re: [Help-glpk] [Fwd: glpk optimization]
Date: Sat, 4 Mar 2017 18:07:35 +0100

Dear all,
I have found in the source code few optimization regarding compraison and loop condition
To find them pls locate into the directory source code root
 find -name "*.c" -exec grep -H '!=' {} \; | egrep '!=\s*0'
approximatively 551 lines should be modified
./cglib/cfg.c:               if (neg[j] != 0)
./cglib/cfg.c:               if (pos[j] != 0)

have to be replace by
./cglib/cfg.c:               if (neg[j])
./cglib/cfg.c:               if (pos[j])

and for the opposite
find -name "*.c" -exec egrep -H '==\s*0' {} \; | wc -l
approximatively 1173 lines should be modified

./glpssx02.c:         if (ssx->q == 0)
./glpssx02.c:         if (ssx->p == 0)

./glpssx02.c:         if (!ssx->q)
./glpssx02.c:         if (!ssx->p)

If you look at the low level the processor has already load the value in the register and the status zero is already on or off
it is not necessary to compare the value with zero. you optimize the code and the number of cpu cycles @ low level

With kind regards
mobile +33608870176

On Sun, Feb 26, 2017 at 10:19 AM, Heinrich Schuchardt <address@hidden> wrote:
Hello Jean-Jacques,

your mail had to be forwarded manually because you are not subscribed to
the GLPK help list, see

It would be great if you could detail you ideas.

Maybe you can set up git repository on github with you patches based on
GLPK 4.61.

Best regards

Heinrich Schuchardt

On 02/23/2017 09:39 AM, Andrew Makhorin wrote:
> -------- Forwarded Message --------
> To: address@hidden
> Subject: glpk optimization
> Date: Wed, 22 Feb 2017 23:48:05 +0100
> Dear glpk dev team,
> I'm Jean-Jacques LOHEAC living in France
> I'm not realy a glpk guru, but I used to be a ilog specialite by the
> past.
> I have used the glpsol tool to solve my problem on a raspberrypi under
> debian.
> I have looking the src code and i have noticed plenty of optimization
> concerning
> the code speed execution that can have big impact on performances.
> If you are interested by my vision, pls let me know
> kind regards
> JJacques LOHEAC
> _______________________________________________
> Help-glpk mailing list
> address@hidden

reply via email to

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