RFR: JDK-8032012, , String.toLowerCase/toUpperCase performance improvement
Ulf.Zibis at CoSoCo.de
Thu Jan 16 19:42:13 UTC 2014
nice performance trick :-)
Do you remember the discussion about :
(this bug was originally filed by me!)
Am 16.01.2014 19:08, schrieb Xueming Shen:
> The proposed changeset is to improve the performance (both speed and memory
> usage) of String.toLowerCase/toUpperCase, by
> (1) to separate the "most likely" use scenario (non supplementary character, no special
> case mapping handling) into simple/quick iteration loop code path
> (2) to use the package private constructor String(char, boolean) to avoid unnecessary
> target char copy in fast-path case.
> (3) some tiny code cleanup.
> Since it's supposed to be a simple/quick round of code cleanup, I did not go too far to
> optimize the supplementary/special mapping code.
> The webrev is
> My small non-scientific speed measurement test suggests we can get 25% to 40%
> speed boost.
More information about the core-libs-dev