&gt; It is much more memory-efficient than thrashing a single graph over and over again. Rewriting and compacting trees is good for cache locality.<p>To be clear: if you are thrashing a single graph over-and-over again, you are doing many passes. Rewriting and compacting trees is just a way to make the multiple passes a bit less painful.