in reply to Re^8: Error handling in chained method calls
in thread Error handling in chained method calls

It's called lower bound approximation.

In this case, I'd call it out-of-bounds :)

And I also idealized by avoiding any inheritance.

Within-bounds. Not all classes use inheritance.


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^9: Error handling in chained method calls

Replies are listed 'Best First'.
Re^10: Error handling in chained method calls
by LanX (Saint) on Oct 25, 2010 at 11:33 UTC
    > And I also idealized by avoiding any inheritance.

    > > Within-bounds. Not all classes use inheritance.

    Irrelevant ... it depends WHAT EXACTLY is tested, if this test was about the overall efficiency of method caching, a (reasonable) worst case should be assumed. That means a inheritance complexity worse than 99,9% of all real live cases.

    But I tested the lower bound of memoizing methods, no selfmade caching can be faster.

    Cheers Rolf

      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.