4 ms·
It keeps the table in memory while the function is in scope.
by byorgey 3y ago
It keeps the table in memory while the function is in scope.
- tsimionescu 3y agoI assume this could be fixed by using a lambda instead of a top level function if you only want to occasionally call such a function, and don't need the whole memoization table around all the time?
- consilient 3y agoYes, although you need to make sure it doesn't get optimized away.