harmony-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Tim Ellison <t.p.elli...@gmail.com>
Subject [classlib][pack200] Sped up hashCode and removed dead getCpAll() (HARMONY-5682)
Date Thu, 03 Apr 2008 09:11:04 GMT
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

Mime
View raw message