Search All of the Math Forum:
Views expressed in these public forums are not endorsed by
Drexel University or The Math Forum.



Profile  missing time
Posted:
Oct 15, 1997 11:49 PM


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.853.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+J1);
>> .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 EMail: t.scott@mang.canterbury.ac.nz University of Canterbury  Web: http://www.mang.canterbury.ac.nz Christchurch, New Zealand  Ph 643 3642987 x 8617 Fax 643 3642020



