>I was hoping that another person who also commented on this method was
going
>to benchmark any difference in performance between reusing a result set
and
>passing null consistently. My instinct is that any performance gain is
>negligible.
The gain -- or loss -- is going to be highly implementation dependent,
based on how much overhead that particular code (and the platform it's
running on) imposes on creating a new instance of the object. There may be
a good reason for letting applications pass this parameter in as an
optimization hint -- but also a good reason for letting the implementation
decide whether accepting that hint makes sense.
So I agree that the wording should be "cannot or choses not to", or
something along those lines, and that users should always never assume that
the object passed in will be the same as the one which is returned.
______________________________________
Joe Kesselman / IBM Research