RFR: JDK-8032012, , String.toLowerCase/toUpperCase performance improvement

Remi Forax forax at univ-mlv.fr
Fri Feb 7 14:27:41 UTC 2014


On 02/07/2014 01:30 PM, Ulf Zibis wrote:
> Am 06.02.2014 18:40, schrieb Xueming Shen:
>> Are we good enough to go? :-) While it took much longer than I would 
>> have
>> expected, but I'm happy with the latest result.
>>
>> http://cr.openjdk.java.net/~sherman/8032012/webrev/
>
> Except "if (first >= len)" instead "if (first = len)" I'm with you.
>
> -Ulf
>

Hi Ulf,
if the JIT is not able to fold
   for(;i<len;) {
      // may call break in the body
   }
   if (i == len) {
     // ...
   }

given that it's a common pattern,
i think it's better to improve the JIT that to change the code.

cheers,
Rémi




More information about the core-libs-dev mailing list