People, 

I want to comment my last letter on the need of profiling.
The matter is that it helps to find errors in theoretical 
estimations, to find the estimation "bugs". 
Analyzing a complex program, the designer may assign the cost
estimations to its parts. For example,  
                   cost(A) < a1*n^3*m^7 + a2*n^4
                   cost(B) < b*2^k 
                   ...
First, one usually, knows  a1, a2, b  very approximately, also is
not so sure, is it, say,  n^3  or maybe  n^3.5.
Finally, the program being complex, some important parts may be 
forgotten. In my example, I had forgotten that certain A20 may cost 
somewhat more than  A.  
Similarly as the examples usually show a bug in a program, the 
example timings are likely to show a bug in the estimations.
In a lazy language, it occurs that with the profiler, the programmer
finds the estimation bug many times easier than without it.

And what is important, these estimations do not depend on the 
implementation. Though, the profiler may behave somewhat 
differently.

------------------
Sergey Mechveliani
[EMAIL PROTECTED]





Reply via email to