RFR: JDK-8032012, , String.toLowerCase/toUpperCase performance improvement
Ulf.Zibis at CoSoCo.de
Thu Feb 6 17:59:42 UTC 2014
Am 05.02.2014 21:06, schrieb Xueming Shen:
> webrev has been updated accordingly.
I still more like the break-to-label approach. It looks more logical and saves one comparison. This
might count on very very short strings, but I would rename it to something like find1stUpperCase: or
As an alternative you could write "if (first >= len)" as counterpart to the last "first < len"
operation in the for loop, which therefore should be merged by JIT.
(Or use "first != len" in the for loop.)
More information about the core-libs-dev