in reply to Re: Efficiency Question
in thread Efficiency Question

To be pedantic, you will take a hit from passing the object references since it will involve an extra ref/deref step. Of course, if that hit actually matters in any way/shape/form, either you or your code have some serious issues.

Replies are listed 'Best First'.
Re^3: Efficiency Question
by AnomalousMonk (Archbishop) on Mar 25, 2009 at 20:30 UTC
    OTOH, in addition to the insignificant performance hit, there may be a very significant maintenance hit. A future maintainer (maybe even the original author of the code!) may take a look at the superfluous ref/deref process, think "What the...?!?", and start looking through a ton of code for some clue as to why such a non-standard and round-about approach was used.

    The considerate thing to do is to avoid setting someone else (or, again, maybe even yourself) up for such a wild-goose chase.

      1. Write wildly confusing code.
      2. Get listed on DWTF
      3. Profit!
      --
      No matter how great and destructive your problems may seem now, remember, you've probably only seen the tip of them. [1]