From Jason Turner
Watch on YouTube

Summary

This episode explores implementing a Python-inspired function memoization cache in C++. Jason builds a generic caching wrapper that can store the results of function calls by their parameter values and return cached results when the same parameters are provided again. The implementation demonstrates the usefulness of this technique by enabling an otherwise impractical recursive Fibonacci implementation to efficiently compute large Fibonacci numbers without performance issues or stack overflow.

Resources

Tags