Etienne <etienne.lebeau (AT) matrox (DOT) com> wrote:
Quote:
I've tried with your test harness with my class ComparableByteArray and
it it gives me the same results. Remming out the lines which pass null
does improve the method who avoid "is" but did not perform better than
the first. |
Hmm. Interesting. It's worth noting here that *most* of the time is
actually spent in Equals itself. The difference in performance between
the two (at least on my box) is very small compared with the total
time. I would be surprised to see a real-life app where it actually
made a significant difference.
However, I'm still surprised to see "is then as" beating "as then
nullity" in the first place. Hmm.
--
Jon Skeet - <skeet (AT) pobox (DOT) com>
http://www.pobox.com/~skeet Blog:
http://www.msmvps.com/jon.skeet
If replying to the group, please do not mail me too