1) the most expensive seems to be comptypes -- at least from data L2 refill point of view (~17%)
2) comptypes is also the most CPU intensive operation since the most of time is spent there
I think comptypes can be sped up by canonicalizing types better, and also adding a conservative hash and checking it first.