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

Ulf Zibis Ulf.Zibis at
Fri Feb 26 22:51:02 UTC 2010

Am 26.02.2010 20:32, schrieb Alan Bateman:
> Ulf Zibis wrote:
> For these other suggestions it would be great to create 
> micro-benchmarks and try our your changes.
> For now though, as I said, I'm just fixing the method to avoid the 
> store for the empty string case.

I've run a benchmark for your "avoid the store for the empty string case":

hashCode() warmup =     25,469 ms
hashCode1() warmup =    116,709 ms
hashCode() time =     11,789 ms
hashCode1() time =     17,744 ms
hashCodes sum = 0

My machine (notebook): 2Ghz Intel Centrino, single core, I32 architecture.
I can't see any advantage of this code. As I guessed before, HotSpot 
server compiler seems to first examine the count value before doing 

Run main() of:


More information about the core-libs-dev mailing list