Add memoization to recover most of the new style code speed penalty
Add memoization to recover most of the new style code speed penalty

beni55/rinohtype,brechtm/rinohtype,beni55/rinohtype,brechtm/rinohtype,brechtm/rinohtype