A missing optimization for simple loops
maaartinus at gmail.com
Sat Jun 14 19:43:48 UTC 2014
A simple loop like in String.hashCode could be sped up by a factor of
nearly 4, if its operations would be rearranged slightly. The problem is
the latency of the iteration (mul+add, i.e., 4 cycles), which can't be
helped by unrolling because of data dependencies. But with the help of some
trivial math it's possible as I described in . Does anybody think it's
worth the effort?
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the hotspot-compiler-dev