[EMAIL PROTECTED] wrote:
> But my understanding is that throw-catch exceptions is much more expensive
> than get the array size directly: arrayVal.length. So there would be a big
> performance hit if we resize arrays frequently. (In fact, we do resize
> StringPool very often.)
>
> So could anyone explain to me why it's designed this way?
While it's true that catching exceptions is more expensive than getting
an array size, performing comparisons for every iteration of a loop is
overall more expensive than the one time overhead of establishing a
catch block. This will be especially true when the arrays start getting
very large.
--
Tom Bradford --- The dbXML Project --- http://www.dbxml.org/
We store your XML data a hell of a lot better than /dev/null
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]