| I am puzzled with the following effect in  ghc-4.04, 06.
| In certain large program
|                                           f x = let  XX...
|                                                      p = ...
|                                                      YY...
|                                                 in   r p
| p  is found respectively cheaply from  x,  
| r  is found expensively via  x, p.
| Now, without having profiling, I want to know what part of the time 
| cost takes evaluating  p.
| For this, I replace  `r p'  with     error $ show p.
| 
| And it takes 1000 times more than computing  p  by separate program,
| without `YY...' part.

I think you are saying that YY is dead code, but still affects runtime
dramatically.  I can't account for this; it sounds implausible.


The best thing would be to use profiling
        p = _scc_ "p" ....

Simon

Reply via email to