String.indexOf optimization

Zoltan Sziladi kissziszi at
Tue Jan 27 06:50:59 UTC 2015

Hi Martin,

Nice catches on the cleanup!

By the way, can you tell me why you used named loops in your code? Isn't it
considered bad practice as it is almost like a goto statement? Couldn't we
refactor it in a way that we do not use named loops?

Also, if there is a for loop that has no start statement and no condition
(like this: for (;; i++) ), then is a for loop a good choice for that code?

I'm just wondering, maybe there are some points of view that I'm not


On Sat, Jan 24, 2015 at 1:29 PM, Martin Buchholz <martinrb at>

> On Sat, Jan 24, 2015 at 1:19 PM, Vitaly Davidovich <vitalyd at>
> wrote:
>> Try -XX:+UnlockDiagnosticVMOptions -XX:DisableIntrinsic:_indexOf
> Thank you very much!  Hard to find because -XX:+PrintFlagsFinal is
> insufficient - also needs  -XX:+UnlockDiagnosticVMOptions

More information about the core-libs-dev mailing list