A missing optimization for simple loops

Martin Grajcar maaartinus at gmail.com
Tue Jul 22 11:08:16 UTC 2014


I wonder if this old posting of mine landed in spam or if you're all too
busy?

Regards,
Martin.

On Sat, Jun 14, 2014 at 9:43 PM, Martin Grajcar <maaartinus at gmail.com>
wrote:

> 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 [1]. Does anybody think it's
> worth the effort?
>
> [1]: http://stackoverflow.com/q/21745619/581205
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.openjdk.java.net/pipermail/hotspot-compiler-dev/attachments/20140722/8f24a946/attachment.html>


More information about the hotspot-compiler-dev mailing list