RFR (XS) 8060485: (str) contentEquals checks the String contents twice on mismatch

Aleksey Shipilev aleksey.shipilev at oracle.com
Tue Oct 14 17:38:22 UTC 2014


Thanks guys!

And of course, I managed to do two minor mistakes in a two-line change:
the indentation is a bit wrong, and cast to String is redundant. Here is
the updated webrev and the changeset (need a Sponsor!):
  http://cr.openjdk.java.net/~shade/8060485/webrev.01/
  http://cr.openjdk.java.net/~shade/8060485/8060485.changeset

-Aleksey.

On 14.10.2014 19:13, Chris Hegarty wrote:
> On 14 Oct 2014, at 17:33, Martin Buchholz <martinrb at google.com> wrote:
> 
>> Looks good to me!
> 
> +1   'noreg-hard'
> 
> -Chris.
> 
>> On Tue, Oct 14, 2014 at 9:05 AM, Aleksey Shipilev <
>> aleksey.shipilev at oracle.com> wrote:
>>
>>> Hi,
>>>
>>> Please review a trivial change in String.contentEquals:
>>>  https://bugs.openjdk.java.net/browse/JDK-8060485
>>>  http://cr.openjdk.java.net/~shade/8060485/webrev.00/
>>>
>>> It improves the performance drastically:
>>>  http://cr.openjdk.java.net/~shade/8060485/perf.txt
>>>
>>> ...not to mention it improves the code readability, and protects us from
>>> rogue CharSequence-s.
>>>
>>> Testing: microbenchmarks, jdk/test/String* jtreg.
>>>
>>> Thanks,
>>> -Aleksey.
>>>
>>>
> 




More information about the core-libs-dev mailing list