[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Fwd: [Bug c++/14563] octave built under Cygwin very slow]
From: |
Paul Kienzle |
Subject: |
Re: [Fwd: [Bug c++/14563] octave built under Cygwin very slow] |
Date: |
Sat, 27 Mar 2004 16:45:24 -0500 |
On Mar 27, 2004, at 3:29 PM, Paul Thomas wrote:
I found
gcc-3.2 20020927 (prerelease) octave-2.1.56 (PK special)
1.51 seconds
gcc-3.3.1 (cygming special) octave-2.1.50
11.97 seconds
ditto
octave-2.1.39 12.75 seconds
The time for the octave-2.1.56 is typical for any of the octave
versions that have been built with gcc-3.2.
Does this defintively takd error and signal handling out of the firing
line?
It sure looks that way.
Changes to malloc is still a possibility. Lots of octave_values get
created and destroyed in your loop.
It will be a bit tedious, but you may get better results from the
poor man's approach to profiling: repeat the statement that you
think is causing the problem, and see if it doubles the time.
I've forgotten by now what happens as you add pieces to the
for-loop:
tot=0; x=ones(50000,1); tic; for i=1:length(x), end; toc
tot=0; x=ones(50000,1); tic; for i=1:length(x), tot; end; toc
tot=0; x=ones(50000,1); tic; for i=1:length(x), tot+x(i); end; toc
tot=0; x=ones(50000,1); tic; for i=1:length(x), tot=tot+x(i); end; toc
tot=0; x=ones(50000,1); tic; for i=1:length(x), end; toc
I assume that even the first loop exhibits the slowdown?
You might see what happens if you modify pt-loop.cc. I would
try doubling the octave_value constructor in:
void
tree_simple_for_command::eval (void)
{
...
if (rhs.is_range ())
{
...
octave_value val (tmp_val);
by adding the following statements:
octave_value val2 (tmp_val);
if (i==0) octave_stdout << "doubling octave_value constructor in
simple for command\n";
When this demonstrates the slowdown (by doubling execution time),
I would start poking around in the octave value class.
Paul Kienzle
address@hidden
- Re: Profiling Octave, (continued)
[Fwd: [Bug c++/14563] octave built under Cygwin very slow], Paul Thomas, 2004/03/25
- [Fwd: [Bug c++/14563] octave built under Cygwin very slow], John W. Eaton, 2004/03/25
- Re: [Fwd: [Bug c++/14563] octave built under Cygwin very slow], Paul Thomas, 2004/03/26
- Re: [Fwd: [Bug c++/14563] octave built under Cygwin very slow], Paul Kienzle, 2004/03/27
- Re: [Fwd: [Bug c++/14563] octave built under Cygwin very slow], Paul Thomas, 2004/03/27
- Re: [Fwd: [Bug c++/14563] octave built under Cygwin very slow],
Paul Kienzle <=
- Re: [Fwd: [Bug c++/14563] octave built under Cygwin very slow], Paul Thomas, 2004/03/28
- Message not available
- Message not available
- Re: [Fwd: [Bug c++/14563] octave built under Cygwin very slow], Paul Kienzle, 2004/03/28
- Re: [Fwd: [Bug c++/14563] octave built under Cygwin very slow], Paul Thomas, 2004/03/28
- Re: [Fwd: [Bug c++/14563] octave built under Cygwin very slow], Paul Kienzle, 2004/03/28