harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Sian January (JIRA)" <j...@apache.org>
Subject [jira] Resolved: (HARMONY-5682) [classlib][pack200] Sped up hashCode and removed dead getCpAll()
Date Fri, 04 Apr 2008 09:59:24 GMT

     [ https://issues.apache.org/jira/browse/HARMONY-5682?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Sian January resolved HARMONY-5682.
-----------------------------------

       Resolution: Fixed
    Fix Version/s: 5.0M6

Patch applied at r644658.  Please check that it was applied as you expected.

> [classlib][pack200] Sped up hashCode and removed dead getCpAll()
> ----------------------------------------------------------------
>
>                 Key: HARMONY-5682
>                 URL: https://issues.apache.org/jira/browse/HARMONY-5682
>             Project: Harmony
>          Issue Type: Improvement
>          Components: Classlib
>         Environment: All Pack200
>            Reporter: Andrew Cornwall
>            Assignee: Sian January
>             Fix For: 5.0M6
>
>         Attachments: main.patch, pack200.patch
>
>
> This patch does two things, one of which may be controversial.
> The uncontroversial code removes SegmentConstantPool.getCpAll(), since it is no longer
used.
> The other code changes hashCode in CPUTF8, CPClass and CPRef. Because hashCode is used
frequently, making it fast is a good idea. In the pack200 code as it exists, hashCode is never
called for CPUTF8, CPClass or CPRef unless all instance variables have been set. The changes
to hashCode make the assumption that this will always hold. As a consequence, hashCode will
throw a NullPointerException when sent to uninitialized instances of these classes.
> The changes to hashCode do improve runtime by about 10%.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message