db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dyre.Tjeldv...@Sun.COM
Subject Re: ArrayInputStream and performance
Date Mon, 27 Nov 2006 16:09:18 GMT
Mike Matrigali <mikem_app@sbcglobal.net> writes:

> I am not sure I understand what is being proposed here.  Is the idea
> that in a delivered system the checks will not be done, 

Correct. See the proposed patch at

>or does
> replacing it by ASSERTS mean that the check is done differently.


> I know store uses a lot of this code, and there is some inline
> code in this exact area for performance reasons.  At one level of
> the store engine it "knows" that what it is acting on is a byte
> array and at least back when the work was done it was a big performance
> improvement - but at other levels of access it is only an
> ArrayInputStream.  Part of this also comes from allowing alternate
> module implementations.

I think that for the case at hand you could have inlined the call to
setPosition (it is not accessed throgh an interface). 
In fact I tried just that, but the effect did not seem
dramatic. Certainly not enough to justify exposing a private data


View raw message