On Thu, 5 Apr 2001 12:36:05 -0500, Kelly Martin <[EMAIL PROTECTED]> said:

>>I have modified whirl&pinch slightly to use "blocking", ie. doing
>>all calculations in small squares (32*32). With that technique very
>>common in numerical computing, the CPU caches (and for GIMP) the
>>tile cache have a much higher hit rate. The boost is quite
>>spectacular: The original whirl&pinch on a larger image (1400*1400)
>>needs on a Athlon-600 30s to complete, with my patch only 6.5s.
>>That's a speedup by a factor of 4.5 without any change in the
>>algorithm itself!

>I was under the impression that whirlpinch used tile regions, which
>should do blocking automatically.  It's been a couple years since I
>looked at the code, though.

Hm, it does not.  The issue with whirlpinch is that there's only a
weak locality relationship between destionation pixels (which are
iterated across the image) and source pixels (which are fetched with
the pixel fetcher).  I haven't looked too closely at your blocking
patch, but I suspect that much the same improvement would be had by
using a pixel region (which respects tiles) to iterate across the
destination region.  

Whirlpinch also has an optimization to do the top and bottom whirls
simultaneously to save calculations.  This might actually be more of a
loss because of the locality hit on the tile cache.

If I get some spare time, I might look at this more closely.

Gimp-developer mailing list

Reply via email to