From: anton@nospicedham.mips.complang.tuwien.ac.at   
      
   James Harris writes:   
   >> One very important thing is whether the computations one benchmarks   
   >> are independent of each other (then you measure throughput), or   
   >> dependent on each other (then you measure latency). And of course,   
   >> for code sequences involving branches, the predictability of the   
   >> branches is an important issue.   
   >   
   >Yes, rather than running   
   >   
   > start timer   
   > loop   
   > code under test   
   > endloop   
   > stop timer and store results   
   >   
   >it may (IMO) be better to run   
   >   
   > loop   
   > start timer   
   > code under test   
   > stop timer and store results   
   > endloop   
      
   Long-running loops are very predictable, that's not what I meant. The   
   timer code may cause more measurement variations than the loop.   
      
   What I meant is that, if "code under test" contains branches, as in   
   some of the sequences in this thread, one may want to arrange the   
   input data such that the branch prediction accuracy in the benchmark   
   is representative of the prediction accuracy in actual usage (and   
   determining what that is is another problem).   
      
   - anton   
   --   
   M. Anton Ertl Some things have to be seen to be believed   
   anton@mips.complang.tuwien.ac.at Most things have to be believed to be seen   
   http://www.complang.tuwien.ac.at/anton/home.html   
      
   --- SoupGate-Win32 v1.05   
    * Origin: you cannot sedate... all the things you hate (1:229/2)   
|