octave-maintainers
[Top][All Lists]
Advanced

[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 Thomas
Subject: Re: [Fwd: [Bug c++/14563] octave built under Cygwin very slow]
Date: Sun, 28 Mar 2004 08:08:27 +0200
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.2.1) Gecko/20030225

Paul Kienzle wrote:


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 agree - the majority of the execution time is not even picked up by gprof, which according to the manual and the gcc bug chasers is quite a frequent occurrence.


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?

Ben did this comparison. I'll do it again, just as soon as I have had my first cup of coffee. It will be a good way to figure out where to start with the poor man's profiling.


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


I'll keep you posted - progress will be a bit slow today because I have an army of little girls to look after; if you stare into space, they ignore you, but the moment you try to do anything......

Paul T



reply via email to

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