comments on optimizations for the union-find data structure