On 09/25/2014 11:40 AM, Aleksey Shipilev wrote: >> This is for HotSpot compiler guys to answer. Theoretically I think it is >> possible. But it would have to be tailored to the very specific use case >> and I don't know if such specific transformation would have wide-enough >> applicability. If it would only speed-up String.hashCode and very >> similar loops, it is less trouble to do that by hand in one or few >> places... > > I would think this happens in user-specified hashCode() over arrays. > IDEs would routinely inject the loop like that or delegate to > Arrays.hashCode, that does the same loop. > > In other words, I would like to see this fixed on compiler side. This > seems to be the strength-reduction playing tricks with loop unrolling, > I'll submit a bug shortly.
https://bugs.openjdk.java.net/browse/JDK-8059113 -Aleksey.
