Need reviewer for forward port of 6815768 (File.getXXXSpace) and 6815768 (String.hashCode)

Jason Mehrens jason_mehrens at hotmail.com
Thu Feb 25 22:23:41 UTC 2010


Alan,

 

Shouldn't the loading of 'this.count' into 'len' be only performed if 'h' is zero?  Otherwise, when hash is not zero we perform a little unnecessary work every time hashCode is called.

 

Jason
 
> Date: Thu, 25 Feb 2010 21:17:37 +0100
> From: Ulf.Zibis at gmx.de
> To: Alan.Bateman at Sun.COM
> Subject: Re: Need reviewer for forward port of 6815768 (File.getXXXSpace) and 6815768 (String.hashCode)
> CC: core-libs-dev at openjdk.java.net; Kelly.Ohair at Sun.COM
> 
> Why don't you use the faster local copy of count for the junction like:
> 
> if (h == 0&& len> 0) {
> 
> ?
> 
> -Ulf
> 
> 
> 
> Am 25.02.2010 20:08, schrieb Alan Bateman:
> > Kelly O'Hair wrote:
> >> Looks fine to me.
> >>
> >> -kto
> > Thanks Kelly and also to Joe for pointing out that I botched the link 
> > to the second one - here is the right webrev:
> > http://cr.openjdk.java.net/~alanb/6921374/webrev/
> >
> > -Alan
> >
> >
> >
> 
 		 	   		  
_________________________________________________________________
Hotmail: Powerful Free email with security by Microsoft.
http://clk.atdmt.com/GBL/go/201469230/direct/01/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.openjdk.java.net/pipermail/core-libs-dev/attachments/20100225/dc8fda27/attachment.html>


More information about the core-libs-dev mailing list