Patent attributes
In non-limiting examples of the present disclosure, systems and methods for interning expression trees are provided. Hash code for a plurality of expression tree nodes is recursively computed and a determination is made as to whether hash code for each of a plurality of expression tree nodes is stored in a cached intern pool. Upon determining that at least one of a plurality of expression tree nodes is not stored in a cached intern pool, one or more functions may be run on at least one of a plurality of expression tree nodes for determining whether at least one of a plurality of expression tree nodes should be stored in a cached intern pool. Normalization of expression trees may also be employed to effectuate effective sharing of expression tree nodes.