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

Vitaly Davidovich vitalyd at gmail.com
Thu Feb 11 23:48:25 UTC 2016


Perhaps

mid = min + (max - min)/2

is better?

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

> On Feb 11, 2016, at 4:46 AM, Roland Westrelin <roland.westrelin at oracle.com
> <javascript:_e(%7B%7D,'cvml','roland.westrelin at oracle.com');>> wrote:
>
>
> overflow issue in the binary search
>
>
> The outer parens look wrong on the fix.  You want to cast to int *after*
> dividing by two, I think.
>
> — John
>


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


More information about the hotspot-compiler-dev mailing list