A
low level programming construct used in situations where a numerical value x determines what block of
code gets executed next. It generally takes the form of an
array of addresses. The
indices of the array correspond to possible values of x. Thus x is used as an offset into the array, the address is read from the array and control jumps to that address. Ideally this can all be done without any
expensive comparison operations. In the
real world there will probably be two comparisons to make sure that x is not above the maximum index in the array or below the minimum.
A high level representation of this concept is the
switch() which is typically compiled into a jump table. If you've understood what I've said so far you'll also understand that it's a
Good Thing to try and keep the conditions in your switch
contiguous so as to avoid situations where most of the space the produced jump table is taking up is used to jump to the default code.
I'd supply a nice example of a jump table in
assembly language here, but I don't remember much assembly language. That's why I'm an untergeek and not an
ubergeek.