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

John Rose john.r.rose at oracle.com
Tue Feb 23 21:05:46 UTC 2016


+1  Thanks, Roland.

> On Feb 23, 2016, at 5:01 AM, Roland Westrelin <roland.westrelin at oracle.com> wrote:
> 
> 
> I haven’t anything more on this so I’m pushing it. Thanks for looking at this John & Vladimir.
> 
> Roland.
> 
>> On Feb 12, 2016, at 4:31 PM, Roland Westrelin <roland.westrelin at oracle.com> wrote:
>> 
>> Hi John,
>> 
>> Thanks for looking at this.
>> 
>>>> 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.
>> 
>> You’re right obviously. Is it good to go if I add the missing parentheses?
>> 
>> int mid = (int)(((uint)max + min) / 2);
>> 
>> Roland.
>> 
>> 
> 



More information about the hotspot-compiler-dev mailing list