Seol mar théacs é seo: Fast memory-efficient generalized belief propagation