Drexel dragonThe Math ForumDonate to the Math Forum



Search All of the Math Forum:

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


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

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 =

3.4700

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


ans =

3.8500

>> 3.85-3.47

ans =

0.3800

>> 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 =

0.2500

>> profile done
>> cputime


ans =

4.0600

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


ans =

4.4500

>>


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 5.1.0.421 on SGI.

--
Tristram Scott, Dept of Management| E-Mail: t.scott@mang.canterbury.ac.nz
University of Canterbury | Web: http://www.mang.canterbury.ac.nz
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]

© Drexel University 1994-2014. All Rights Reserved.
The Math Forum is a research and educational enterprise of the Drexel University School of Education.