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,809 of 4,675   
   Terje Mathisen to Rick   
   Re: Fast conversion to a boolean of 0 or   
   08 Mar 19 23:35:28   
   
   From: terje.mathisen@nospicedham.tmsw.no   
      
   Rick wrote:   
   > Ranking:   
      
   Perfect prediction:   
   >      #1  0, -1            1267   
   >      #2  -1, 0            1285   
   >      #3  Empty            1293   
   Very good branch prediction   
   >      #4  JZ               1321   
   These are all effectively identical, they have the exact same critical   
   latency path length, just using different instructions.   
      
   >      #5  Terje ADC        1546   
   >      #6  James SBB + NEG  1554   
   >      #7  SBB              1555   
   >      #8  SETNZ            1554   
      
   CMOV is always quite slow, I have (almost) never found it a win.   
   >      #9  CMOV             2077   
   It normally does not use value prediction, instead it will use a   
   three-operand instruction where the old value and the new value are   
   inputs along with the predicate: Minimum latency is typically 2 cycles,   
   all on the critical path.   
      
   Terje   
      
   --   
   -    
   "almost all programming can be viewed as an exercise in caching"   
      
   --- 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