Added support for type hashing. This reduces memory allocation in the critical path and wire-size