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



_______________________________________________
glob2-devel mailing list
[email protected]
http://lists.nongnu.org/mailman/listinfo/glob2-devel

Reply via email to