The Math Forum

Search All of the Math Forum:

Views expressed in these public forums are not endorsed by NCTM or The Math Forum.

Math Forum » Discussions » Software » comp.soft-sys.matlab

Notice: We are no longer accepting new posts, but the forums will continue to be readable.

Topic: Profile - missing time
Replies: 4   Last Post: Oct 30, 1997 9:39 AM

Advanced Search

Back to Topic List Back to Topic List Jump to Tree View Jump to Tree View   Messages: [ Previous | Next ]
Tristram Scott

Posts: 11
Registered: 12/7/04
Profile - missing time
Posted: Oct 15, 1997 11:49 PM
  Click to see the message monospaced in plain text Plain Text   Click to reply to this topic Reply

Profile seems to be missing out on a whole lot of activity. Can anyone explain
what has happened to the missing 0.25 seconds below?

>> profile hilb
>> H=hilb(400);
>> profile reset
>> cputime

ans =


>> H=hilb(400);
>> cputime

ans =


>> 3.85-3.47

ans =


>> profile report
Total time in "/usr/local/matlab/toolbox/matlab/elmat/hilb.m": 0.13 seconds

100% of the total time was spent on lines:
[23 21 20 22]

19: J = 1:n;
0.02s, 15% 20: J = J(ones(n,1),:);
0.03s, 23% 21: I = J';
0.01s, 8% 22: E = ones(n,n);
0.07s, 54% 23: H = E./(I+J-1);

>> .38-.13

ans =


>> profile done
>> cputime

ans =


>> H=hilb(400);
>> cputime

ans =



I did the first hilb call to ensure that the routine was already interpreted,
so there should be no overhead lost there. Neither is the extra CPU time lost
in doing the profiling, as the last call without profiling shows.

If the profiler can't account for all the time in a simple five line function
like hilb, can we be sure that it has the ratios of time correct?

Is this perhaps rounding error resulting from counting in lots of 0.01 seconds?

I first noticed this when profiling a routine which takes around 210 seconds,
and being told by profile that it could only account for 70 seconds.

This is on an SGI O2, running MATLAB Version on SGI.

Tristram Scott, Dept of Management| E-Mail:
University of Canterbury | Web:
Christchurch, New Zealand | Ph 643 364-2987 x 8617 Fax 643 364-2020

Point your RSS reader here for a feed of the latest messages in this topic.

[Privacy Policy] [Terms of Use]

© The Math Forum at NCTM 1994-2018. All Rights Reserved.