RFR(S): 8007986: GrowableArray should implement binary search
roland.westrelin at oracle.com
Wed Apr 15 10:25:52 UTC 2015
> Just a couple of notes in passing.
> 1) may be worthwhile to compute mid in a way that avoids possible signed overflow? I'm guessing this class is not used with sizes that large, but just a precaution.
> 2) perhaps store the result of calling f() in a local to avoid calling it twice?
Thanks for the suggestions. Here is a new webrev that take them into account:
> sent from my phone
> On Mar 26, 2015 9:34 AM, "Roland Westrelin" <roland.westrelin at oracle.com> wrote:
> The same binary search code on GrowableArray is used in 3 places (in the compilers). This moves that code in GrowableArray.
More information about the hotspot-dev