home bbs files messages ]

Forums before death by AOL, social media and spammers... "We can't have nice things"

   comp.lang.asm.x86      Ahh, the lost art of x86 assembly      4,675 messages   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]

   Message 3,817 of 4,675   
   Anton Ertl to James Harris   
   Re: Fast conversion to a boolean of 0 or   
   11 Mar 19 08:21:11   
   
   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)   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]


(c) 1994,  bbs@darkrealms.ca