help-octave
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: Plotting with 3.2.0 on Windows is SLOOOOOOWWWW


From: Tatsuro MATSUOKA
Subject: RE: Plotting with 3.2.0 on Windows is SLOOOOOOWWWW
Date: Wed, 5 Aug 2009 04:43:43 +0900 (JST)

Hello

--- Olli Saarela  wrote:

> I was looking for a CPU consuming loop in the C++ code, but there might
> actually be some in the script files. Does this help?
> 
> *** __gnuplot_get_var__.m~      Tue Jun  9 23:22:14 2009
> --- __gnuplot_get_var__.m       Mon Aug  3 13:52:35 2009
> ***************
> *** 125,135 ****
>         fflush (ostream);
> 
>         str = {};
>         while (isempty (str))
>           str = char (fread (istream)');
> !         if (! isempty (str))
>             str = regexp (str, "OCTAVE:.*", "match");
>             str = str{end}(8:end);
>           endif
>           fclear (istream);
>         endwhile
> --- 125,137 ----
>         fflush (ostream);
> 
>         str = {};
>         while (isempty (str))
>           str = char (fread (istream)');
> !         if (isempty (str))
> !           sleep(0.05);
> !         else
>             str = regexp (str, "OCTAVE:.*", "match");
>             str = str{end}(8:end);
>           endif
>           fclear (istream);
>         endwhile
> 
> 
> On my multicore machine the tic-toc timing is practically the same, but
> cputime() shows a significant speed-up.
> 

First 
> !         if (isempty (str))
> !           sleep(0.05);
> !         else

I have tested on computer in my home (cpu Celerron M 1.3GHz)
Why 'else' is here? 
With this 'else' plot was failled.

I remove 'else' and tested argument of sleep from 0.05 to 1 with task manager 
active.
Octave consumed 99% cpu time while loop of this test. 
N = 100;
n = 2;
m = 2;
tic
for i = 1:n*m
    x = rand (2,N);
    subplot (n,m,i);
    plot (x(1,:),x(2,:)); 
end
toc


Regards

Tatsuro

--------------------------------------
Power up the Internet with Yahoo! Toolbar.
http://pr.mail.yahoo.co.jp/toolbar/


reply via email to

[Prev in Thread] Current Thread [Next in Thread]