I've brought that up earlier and I still get thumbs-down from other people regarding such changes in the 7.8 branch. In my opinion a variant which is overall faster but where the slowest cases happen to shift to new places is a reasonable optimization even in the current branch but I'm not making the call.
One very easy fix that I'd like to push through is to remove an odd restriction that identifier caching only happens in objects with >= 9 identifiers. (See FIND_FUNCTION_HASH_TRESHOLD in program.c.) I don't see any rationale for why smaller objects shouldn't benefit from that cache at all; if it's a hot path it should be cached. Granted the risk for collisions increase with more identifier entries in total but I guess that is offset by getting more cache hits during a particular program action before the working set changes.