From: John H. <jdh...@ac...> - 2004-12-21 18:34:08
|
>>>>> "John" == John Hunter <jdh...@ac...> writes: John> I made some small changes which helped here - eg, deferring John> the initialization of the LUTs until they are actually John> requested. This shaved 0.3 s off startup time on my system. John> With Todd's help, I also made some changes in the core John> "fromarray" in extension code which delivered some speedups, John> and removed some extra checks in the colormapping code which John> are not needed for data that are properly normalized. I John> also think I found and fixed redundant calls to draw in some John> backends due to improper event handling and hold handling John> that crept into 0.65. Well, Xavier Gnata just pointed out to me off list that almost half the cost of the default image handling was in the normalization calls to min and max. After a little poking around, I discovered we were using python's min and max here, which means sequence API. Ouch! So we get another 2x speedup on top of the numbers I just posted using default normalization and colormapping. # GTKAgg default normalization and colormapping # 0.65 matplotlib 0.65 figimage : 9.97s matplotlib 0.65 imshow : 9.91s # optimization numbers in my last post matplotlib figimage : 5.23s matplotlib imshow : 5.18s # as above but using nxmin and nxmax matplotlib figimage : 2.21s matplotlib imshow : 2.24s So out of the box the next matplotlib will be more than 4x faster than the last release for images. A long way from MIDAS and IRAF, but still satisfying for a day's work. JDH |