This consists of a series of hash table lookups, each producing either a specification of the next dispatch step or the final handler and extra argument. If the dispatch cache is invalid, the handler is the function to update the cache. Each dispatch step is either a class dispatch step or an EQL dispatch step. In a class dispatch step, the hash table comes from the instance information of one of the arguments and the key indicates the generic function and the argument number. In an EQL dispatch step, the hash table is associated with the generic function and the key is one of the arguments.
Ivory has the most efficient dispatch implementation.
This organization was chosen because Ivory has two instructions, originally intended for Flavors, that employ hashing hardware to do a class or EQL dispatch step, placing the extra argument into the appropriate stack slot and jumping to the handler. If a dispatch step is not the last one, the handler performs the next dispatch using one of these instructions. The extra argument for a class dispatch step is the key. For an EQL dispatch step, it is a dummy object whose instance information contains the hash table. The 3600 and CLOE use a similar dispatch table, but instead of an instruction address there is either a handler function or a command to a dispatch table interpreter.