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.


Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
"Science is about questioning the status quo. Questioning authority".
In the absence of evidence, opinion is indistinguishable from prejudice.
RIP an inspiration; A true Folk's Guy
  • Comment on Re^11: Error handling in chained method calls