> Do you think it would be better to do
> 1) a hash lookup by function oid to a linked list of different compiled
> versions (for each set of argument/return types)
> -or-
> 2) create hash key using a new structure that includes function oid,
> return type, and argument types, and use that for direct lookup.
The latter. By the time you pay the price of a hash lookup, a slightly
longer key is nearly free. (Maybe entirely free, since it might produce
better-distributed hash values.)
dynahash only supports fixed-length keys, so don't forget to zero out
unused positions in the argument type vector.
BTW, I can't see any need to include the return type in the hash key ---
wouldn't it be predetermined given the argument types?
regards, tom lane