Jan. 3, 2016
4:01 a.m.
Nick Coghlan writes:
(and if a function is performance critical enough for the results to be worth caching, then it's likely performance critical enough to be thinking about micro-optimisations).
Maybe. It could be that the "real" implementation is Very Expensive to invoke, and/or that the characteristics of how the function is called change the complexity class of an algorithm that calls it for a cached vs non-cached version.