[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: help offer
From: |
Daniel J Sebald |
Subject: |
Re: help offer |
Date: |
Tue, 03 Apr 2007 12:14:57 -0500 |
User-agent: |
Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.3) Gecko/20041020 |
David Grohmann wrote:
There is this but my guess is most of it is out of date as well.
http://wiki.octave.org/wiki.pl?MostWanted
On the matter of this item:
o A means of passing data to gnuplot that allows binary data to be transferred
and does not involve writing temporary files. This is particularly evident if
you try plotting a large vector (100000 points or more) and compare the speed
difference between Octave and Matlab.
I've put together a simple test that uses "fwrite" rather than "fprintf".
Using:
x = rand(1,100000);
the following:
tic; plot(x)
toc
takes:
9.4 s with ASCII fprintf() version
4.9 s with binary fwrite() version
When I isolate tic/toc around the fprintf and fwrite commands in
__go_draw_axes__.m, I see:
12.1 s with ASCII fprintf() version
2.9 s with binary fwrite() version
Now, one big question is why the time *increases* when I parred down the tic/toc
to a single script command? Perhaps there is some interaction with the
tic/toc/fprintf; I'm not sure.
Another interesting detail is that:
A = rand(1000,100);
tic; image(A)
toc
takes 1.7 s. (It's binary transfer.) Which tells me that a lot more work goes
on inside gnuplot/gnuplot_x11 when plotting 100,000 lines than there is when
plotting a single image.
Dan