Wednesday 22 May 2013

Memoization using jHighFun

Memoization in computer science is about memorizing the method calls along with input parameter(s) and result object in order to avoid the next invocation and returning the result from cache for given input parameter(s).

It helps achieve
  • Faster method execution response
  • Avoid the use of system resource(s) such as CPU cycles, external system calls if any etc. which in general method requires to complete execution
Any kind of software application written down into smaller re-usable modules would be able to benefit from memoization as probability of invocation of such modules and services they provide are higher.