You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@harmony.apache.org by Tim Ellison <t....@gmail.com> on 2008/04/03 11:11:04 UTC

[classlib][pack200] Sped up hashCode and removed dead getCpAll() (HARMONY-5682)

Andrew Cornwall (JIRA) wrote:
> I didn't do that because I assumed the overhead of the exception
> handler would be too much. But it's worth a try - so I just did. Here
> are the results for my testcase:
> 
> CpClass 0.685 3.066 Without exception handler: 0.685 s With exception
> handler: 3.066 s
> 
> CpRef Without exception handler: 1.204 s With exception handler:
> 1.873 s
> 
> CPUTF8 Without exception handler: 2.323 s With exception handler:
> 6.761 s
> 
> In other words, with exception handlers our time for hashCode almost
> doubles. Since hashCode accounts for slightly more than 10% of the
> total time of the test case with the exception handlers and less than
> 4% without, I'm inclined to leave the exceptions uncaught.

Interesting.  Are you running those tests with the IBM VM or the DRLVM?

I'm assuming that the difference in performance is due to the JITs 
reluctance to in-line the longer version of hashCode() since the 
exception handler itself should make no difference.

Regards,
Tim

Re: [classlib][pack200] Sped up hashCode and removed dead getCpAll() (HARMONY-5682)

Posted by Andrew Cornwall <an...@gmail.com>.
I'm running with the IBM J9 embedded VM. Sian came up with some patches (in
HARMONY-5682) that made things even faster.

    Andrew Jr.

On Thu, Apr 3, 2008 at 2:11 AM, Tim Ellison <t....@gmail.com> wrote:

> Andrew Cornwall (JIRA) wrote:
>
> > I didn't do that because I assumed the overhead of the exception
> > handler would be too much. But it's worth a try - so I just did. Here
> > are the results for my testcase:
> >
> > CpClass 0.685 3.066 Without exception handler: 0.685 s With exception
> > handler: 3.066 s
> >
> > CpRef Without exception handler: 1.204 s With exception handler:
> > 1.873 s
> >
> > CPUTF8 Without exception handler: 2.323 s With exception handler:
> > 6.761 s
> >
> > In other words, with exception handlers our time for hashCode almost
> > doubles. Since hashCode accounts for slightly more than 10% of the
> > total time of the test case with the exception handlers and less than
> > 4% without, I'm inclined to leave the exceptions uncaught.
> >
>
> Interesting.  Are you running those tests with the IBM VM or the DRLVM?
>
> I'm assuming that the difference in performance is due to the JITs
> reluctance to in-line the longer version of hashCode() since the exception
> handler itself should make no difference.
>
> Regards,
> Tim
>