This sharing is the key to the polynomial runtime.
this idea actually underlies several parsing algorithms for equivalent mildly context-sensitive formalisms, such as tree-Adjoining Grammar (Joshi and Schabes, 1997).