in reply to Re^10: Error handling in chained method calls
in thread Error handling in chained method calls
But I tested the lower bound of memoizing methods
I'm saying that you tested below the lower bound, because what you tested was for all intents and real-world purposes, impractical. And therefore irrelevant.
On the other hand, regardless of how deep the inheritance goes, including no levels deep, the second time a method is called, it will have been memoised the first time, and the cost of discovery is done. It will in future be amortised over all subsequent calls to that method. The only time the depth of inheritance would negative effect the efficiency of caching, is if a method was only called once. In which case, the cost of assigning to the cache is overhead, but then there'd be no point in caching it.
But, I think we're probably at cross-purposes here, so enough.
|
|---|