db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Dyre Tjeldvoll (JIRA)" <j...@apache.org>
Subject [jira] Commented: (DERBY-2118) Change some boundary checks in ArrayInputStream to ASSERTs to improve performance
Date Tue, 28 Nov 2006 12:30:23 GMT
    [ http://issues.apache.org/jira/browse/DERBY-2118?page=comments#action_12453903 ] 
            
Dyre Tjeldvoll commented on DERBY-2118:
---------------------------------------

Sorry, I guess I should have been a bit more verbose. The script used wasn't really written
with publication in mind. Here is a legend for the previous comment:

bln = baseline = unmodified trunk
exp = experiment = with patch
%chg = percent change from trunk to patch (positive number means performance increase)

f(n,m) = value of the f (Fisher) statistic with n and m degrees of freedom, which basically
gives a measure of how likely it is that the two averages actually are the same (that the
observed difference is due to variance in the samples). In the back of any statistics book
you'll find a table which tells you that the critical values for f(1,18) is 4.41 for alpha=0.05
and 8.29 for alpha=0.01. Which in turn means that if f > 4.41, then the probability of
the means being different is greater than 0.95, and that if f > 8.29 the probability is
greater than 0.99

> Change some boundary checks in ArrayInputStream to ASSERTs to improve performance
> ---------------------------------------------------------------------------------
>
>                 Key: DERBY-2118
>                 URL: http://issues.apache.org/jira/browse/DERBY-2118
>             Project: Derby
>          Issue Type: Improvement
>          Components: Performance
>    Affects Versions: 10.2.1.6
>            Reporter: Dyre Tjeldvoll
>            Priority: Trivial
>             Fix For: 10.3.0.0
>
>         Attachments: derby-2118.diff, derby-2118.stat, derby-2118.v2.diff
>
>
> Profiling shows that a significant amount of CPU is spent doing boundary checking in
ArrayInputStream.setPosition() and ArrayInputStream.setLimit(). These checks appear to be
there to detect error conditions, so it seems more appropriate to make them ASSERTs. Especially
since they are so expensive.
> DTrace analysis seems to confirm that these methods get called very frequently:
> Knut Anders Hatlen wrote the following in a message on derby-dev:
> FYI, I just ran the DERBY-1961 test clients and traced them with a
> DTrace script that printed how often each method was called. For the
> join client, ArrayInputStream.setPosition() was the most frequently
> called method (43837.7 calls/tx). For the single-record select client,
> it was third (58.4 calls/tx), only beaten by Object.<init>() and
> DDMWriter.ensureLength(). I think this means that setPosition() is the
> engine method that is most frequently called, at least in read-mostly
> transactions.  ArrayInputStream.setLimit() also appeared near the top
> of the list. See http://wiki.apache.org/db-derby/Derby1961MethodCalls
> for the details.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Mime
View raw message