Recitation 17

  1. Discuss why the performance improvements obtained by memoizing the Fibonacci function are more dramatic than for the factorial function.

  2. What happens if we try to memoize a function with side effects (printing to the console, raising exceptions, etc.)?

  3. Are there any potential downsides to memoizing a function in a long-running computation such as a server?