Moderate speed up on contig, cosines are cached, no more gauss on contig

Spent about 14 hours trying to get dynamic programming working on
symmetry, I can't get it to work and even my intended framework is only
about a second faster than the current version @t10. Contig however is
worth more effort i think as its egregiously slow