Email: Password: Remember Me | Create Account (Free)

Back to Subject List

Old thread has been locked -- no new posts accepted in this thread
???
12/16/03 22:50
Read: times


 
#60779 - Jump table
Responding to: ???'s previous message
If you have more than a few conditions, a jump table will be a more efficient...


That depends on the nature of the conditions!
If they are very sparsely distributed in a large search space, multiple tests are still likely to use less code space.

Multiple tests also give the opportunity to prioritise, by doing the highest priority test first; conversely, a jump table has the advantage that all conditions take the same time.

As ever, the "best" answer depends very heavily on the nature of the question!

List of 10 messages in thread
TopicAuthorDate
if then construction in assembly            01/01/70 00:00      
   RE: if then construction in assembly            01/01/70 00:00      
      RE: if then construction in assembly            01/01/70 00:00      
   RE: if then construction in assembly            01/01/70 00:00      
   RE: if then construction in assembly            01/01/70 00:00      
      Jump table            01/01/70 00:00      
         RE: Jump table            01/01/70 00:00      
   RE: if then construction in assembly            01/01/70 00:00      
      RE: if then construction in assembly            01/01/70 00:00      
   don\'t forget the carry            01/01/70 00:00      

Back to Subject List