Use a table of already-built structures to increase sharing.
See also: MemoisingCafs, Tying the Knot.