|Home > Generic function call interface > Function call optimizations > String comparison and hashing|
When an instance receives an incoming function call, in other words a request, it must first look up the function by name.
In U64JSON, all strings are sequences of 64-bit values. They have several properties that implementations can exploit to make function lookup more efficient:
uint64_tvalues, and most Iris function names can be encoded using 1-4
uint64_tvalues. It is possible to write explicit code for these four cases instead of using a generic loop.
It is often possible to implement a function lookup that does not check for unknown functions in constant time by using closed hashing on the first 64-bit value and comparison of the second 64-bit value only if necessary. Checking for unknown functions can be a runtime option which then uses a slower decoder (debug mode).