Improve performance: Caching

It is really useful if many people want to see the same results.

Process

  1. Record the inputs to and outputs from every call to a function.
  2. When the cache function is called with a set of inputs that it’s already seem:
  • Replay the recorded output without recomputing