Michael Droettboom wrote:
John Hunter wrote:
    log_demo.py                               1.769  2.011  0.242    113%

Here is another area where there is an important difference.  Panning
and zooming interactively with log scaling is much slower on the
branch, presumably because you have to redo the non-affine part every
time.

The non-affine part is not computed on every pan and zoom -- that was one of the main design goals of the branch. (You can put a print statement in Log10Transform.transform to see when it gets called.) I can't feel a speed difference between the two, but...

Also, the old grid line bug on log plots seems to be back, as
evinced when you zoom from the "home" view.

...I should fix this bug first to have a fair comparison.

Fixing that bug actually had a net positive effect on the benchmarks overall... (More correct *and* faster? Never happens.)

I created a benchmark using the middle plot of log_demo.py and moving the bounds (just like simple_plot_fps.py) and I get the following:

Trunk: 23.68 fps
Branch: 16.83 fps

So there's definitely a slow down there. The profiler shows that a huge chunk of the time is spent in numpy/core/ma.py, suggesting that masked arrays are the culprit. I think further quarantining of masked arrays will help -- for instance, a masked array is created whether or not there are any values <= 0.0.

Any thoughts on this are welcome.

Cheers,
Mike

--
Michael Droettboom
Science Software Branch
Operations and Engineering Division
Space Telescope Science Institute
Operated by AURA for NASA
#!/usr/bin/env python
"""
Example: simple line plot.
Show how to make and save a simple line plot with labels, title and grid
"""
from pylab import *

ion()

t = arange(0.001, 20.0+0.001, 0.001)
plot(t, sin(2*pi*t))

xlabel('time (s)')
ylabel('voltage (mV)')
title('About as simple as it gets, folks')
grid(True)
axes().set_xscale('log')

import time

frames = 100.0
t = time.time()
c = time.clock()
for i in xrange(int(frames)):
    part = i / frames
    axis([part * 20.0 + 0.001, part * 20.0 + 20.001, -1.0, 1.0])
wallclock = time.time() - t
user = time.clock() - c
print "wallclock:", wallclock
print "user:", user
print "fps:", frames / wallclock
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Matplotlib-devel mailing list
Matplotlib-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-devel

Reply via email to