glob2-devel
[Top][All Lists]
Advanced

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

Re: [glob2-devel] gradient improvement


From: Kai Antweiler
Subject: Re: [glob2-devel] gradient improvement
Date: Thu, 23 Mar 2006 16:24:42 +0100
User-agent: Gnus/5.1002 (Gnus v5.10.2) XEmacs/21.4 (Jumbo Shrimp, linux)

Sorry!
It should have been:
                                        if (ci&1)
                                                
listedEvenAddr[listCountEvenWrite++] = deltaAddrC[ci];
                                        else
                                                
listedOddAddr[listCountOddWrite++] = deltaAddrC[ci];

instead of:

                                        if ((x+y)&1)
                                                
listedOddAddr[listCountOddWrite++] = deltaAddrC[ci];
                                        else
                                                
listedEvenAddr[listCountEvenWrite++] = deltaAddrC[ci];

in the "odd loop".

But the further speed up between these two seems insignificant on the
small map.  WaterInTheDessert doesn't have much structure.  On other
maps this should be perceptible.  Actually this is an important
change for more complex maps.


I'll draw a quick picture to explain:

1.case: the order in our list gets disrupted or isn't cared about at all.
We will get situations like this:
888888888
777*77777        the * (gradient=7) is not jet processed, but will be now
6666

As you can see there is no nondiagonal field on which the optimization can
work.

2.case: Two nice orderly lists
888888888
777*77777        the * (gradient=7) is not jet processed, but will be now
666

Here is one nondiagonal field on which the optimization can work.

-- 
Kai Antweiler





reply via email to

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