redone: remove redundant memoise
merge branch 'speed-improvements'