Enable memoization to improve parsing speed.