Compact tree of Thomas Memory