Might be interesting to see how much time is spent in this function. It can call `_typenum_fromtypeobj` which in turn loops through all the types trying to match addresses. With 24 types that might not be the most efficient way. Unfortunately, the addresses aren't necessarily in the same order as the types. But doing anything about that function will depend on if it takes a lot of time.