RFR(S): 8007986: GrowableArray should implement binary search

Vitaly Davidovich vitalyd at gmail.com
Fri Feb 12 03:25:38 UTC 2016

I'd be more worried about the branch mispredicts and memory loads than a
couple of single cycle multi issue instructions :).  Anyway, the halfway
idiom is known and not subject to issues like the cast precedence you
raised or other bug prone variants, and I'd think the extra sub isn't going
to be detectable.

My $.02

On Thursday, February 11, 2016, John Rose <john.r.rose at oracle.com> wrote:

> On Feb 11, 2016, at 4:33 PM, Vitaly Davidovich <vitalyd at gmail.com
> <javascript:;>> wrote:
> >
> > Optimize better how? The concern here would be idiv but gcc seems to
> strength reduce this code without uint just fine.
> No, idiv-by-2 is not an issue.  My concern is simply instruction count:
> add/shift vs. sub/shift/add.

Sent from my phone
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.openjdk.java.net/pipermail/hotspot-compiler-dev/attachments/20160211/976dd9e6/attachment.html>

More information about the hotspot-compiler-dev mailing list