[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Octave-bug-tracker] [bug #47036] regressions in core m-files due to ism
From: |
Rik |
Subject: |
[Octave-bug-tracker] [bug #47036] regressions in core m-files due to ismatrix changes |
Date: |
Tue, 02 Feb 2016 22:40:09 +0000 |
User-agent: |
Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:43.0) Gecko/20100101 Firefox/43.0 |
Follow-up Comment #12, bug #47036 (project octave):
@Lachlan: The plot code isn't particularly time sensitive since it tends to
work on human time scales (hundreds of ms) versus CPU scales (tens of
nanoseconds). But 10 seconds to plot something is way too long! At that
point one is dissuaded from trying quick plots just to get an idea of what the
data looks like.
In the case of upper-level files like contourc.m, the input validation is done
once, not multiple times, so I don't think it is a problem.
Poor graphics performance deserves its own bug report. To check, I used your
example and while the numbers are different, the gist is the same.
octave:1> x = rand (48,365);
octave:2> tic; plot (x); toc
Elapsed time is 3.20617 seconds.
octave:3> y = x';
octave:4> figure (2)
octave:5> tic; plot (y); toc
Elapsed time is 0.43588 seconds.
octave:6> 3.20617 / 0.43588
ans = 7.3556
I turned on the profiler to get an idea of what is happening.
octave:7> profile on; plot (x); profile off
octave:8> profshow
# Function Attr Time (s) Time (%) Calls
-----------------------------------------------------------------------
76 __go_line__ 1.427 43.81 365
70 __line__ 0.950 29.17 365
61 cellfun 0.346 10.63 1095
59 strsplit 0.076 2.32 365
15 get 0.075 2.31 3295
51 __plt__>__plt2vm__ 0.050 1.52 1
21 __next_line_style__ 0.043 1.32 366
69 line 0.033 1.03 365
As you can see, there is a for loop somewhere rather than vectorized code
because each of the problem routines is getting called 365 times. It looks to
me like the issue is in __plt__.m where I do see for loops over the number of
columns in the matrix.
It is really only two routines that make up ~3/4 of the time. __go_line__ is
in C++. At some point the whole OpenGL plotting framework for Octave needs to
be overhauled. The other routine is __line__ which one might be able to do
something about since it is an m-file.
_______________________________________________________
Reply to this item at:
<http://savannah.gnu.org/bugs/?47036>
_______________________________________________
Message sent via/by Savannah
http://savannah.gnu.org/
- [Octave-bug-tracker] [bug #47036] regressions in core m-files due to ismatrix changes, Colin Macdonald, 2016/02/01
- [Octave-bug-tracker] [bug #47036] regressions in core m-files due to ismatrix changes, Colin Macdonald, 2016/02/01
- [Octave-bug-tracker] [bug #47036] regressions in core m-files due to ismatrix changes, Colin Macdonald, 2016/02/01
- [Octave-bug-tracker] [bug #47036] regressions in core m-files due to ismatrix changes, Rik, 2016/02/02
- [Octave-bug-tracker] [bug #47036] regressions in core m-files due to ismatrix changes, Rik, 2016/02/02
- [Octave-bug-tracker] [bug #47036] regressions in core m-files due to ismatrix changes, Colin Macdonald, 2016/02/02
- [Octave-bug-tracker] [bug #47036] regressions in core m-files due to ismatrix changes, Rik, 2016/02/02
- [Octave-bug-tracker] [bug #47036] regressions in core m-files due to ismatrix changes, Colin Macdonald, 2016/02/02
- [Octave-bug-tracker] [bug #47036] regressions in core m-files due to ismatrix changes, Lachlan Andrew, 2016/02/02
- [Octave-bug-tracker] [bug #47036] regressions in core m-files due to ismatrix changes, Michael Godfrey, 2016/02/02
- [Octave-bug-tracker] [bug #47036] regressions in core m-files due to ismatrix changes,
Rik <=
- [Octave-bug-tracker] [bug #47036] regressions in core m-files due to ismatrix changes, Colin Macdonald, 2016/02/03
- [Octave-bug-tracker] [bug #47036] regressions in core m-files due to ismatrix changes, Colin Macdonald, 2016/02/03
- [Octave-bug-tracker] [bug #47036] regressions in core m-files due to ismatrix changes, Colin Macdonald, 2016/02/03
- [Octave-bug-tracker] [bug #47036] regressions in core m-files due to ismatrix changes, Rik, 2016/02/08