Dictionary memoization for faster specs