(1989) devoted several pages to a discussion of how to "modularize" type codes, which typically achieves a smaller code in exchange for a larger-time operation than bitwise AND as the implementation of type unification.
if x is a type in the module whose bottom is y, and z has no module, then x z = y z unless y z = y in which case x z = x; so it only remains to compute joins within the tree.