Dave Cramer wrote:
> While reading the source code, I noticed we use instanceOf *alot* this
> is (used to be ? ) a fairly expensive operation. Does anyone know the
> state of the current technology, and what the cost of instanceof really
> is?
instanceof is cheap in comparison to the other work the driver does. I
wouldn't worry about it unless you have some benchmarks that point to it
as a real bottleneck.
> Then I guess the next question is how to refactor the instanceof out?
The main user is setObject() and friends. We can't avoid an instanceof
or getClass() in this case -- we need to know the runtime type of the
object to do anything sensible with it.
-O