Remove memoization

Because it may return a wrong value when memoization hash collision is
occurred.

If performance problem is occurred, we should write benchmark program
and them improve performance.