-graphs optimizations