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

Back to Subject List

Old thread has been locked -- no new posts accepted in this thread
???
12/20/01 10:32
Read: times


 
#17858 - RE: case statement using assy
An advantage of the Jump table approach is that the branch takes the same time for all input values; this may be important, depending on the application.

By contrast, a series of ifs will take longer depending on how many tests have to be made before the correct value is found. This can also be used to advantage if you want to prioritise a certain value, or if certain values occur (much) more frequently.

As ever, there is no "right" answer - you must evaluate the pros & cons of each in the light of your particular requirements.

List of 9 messages in thread
TopicAuthorDate
case statement using assy            01/01/70 00:00      
RE: case statement using assy            01/01/70 00:00      
RE: case statement using assy            01/01/70 00:00      
RE: case statement using assy            01/01/70 00:00      
RE: case statement using assy            01/01/70 00:00      
RE: case statement using assy            01/01/70 00:00      
RE: case statement using assy - spencer            01/01/70 00:00      
RE: case statement using assy            01/01/70 00:00      
RE: case statement using assy            01/01/70 00:00      

Back to Subject List