JDK-6313320 : Performance regression of String.toUpperCase() and toLowerCase()
Type:Bug
Component:core-libs
Sub-Component:java.lang
Affected Version:6
Priority:P3
Status:Resolved
Resolution:Fixed
OS:solaris
CPU:x86
Submitted:2005-08-19
Updated:2013-11-01
Resolved:2005-10-10
The Version table provides details related to the release that this issue/RFE will be addressed.
Unresolved : Release in which this issue/RFE will be addressed. Resolved: Release in which this issue/RFE has been resolved. Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.
Even after the fix for 6265809, String.toUpperCase() and toLowerCase() in Mustang workspace is slower than the same methods in 1.5.0_X and much slower than 1.4.2_X. This should be fixed.
Comments
EVALUATION
Added a separate fast path for non-supplementary character case conversions. Here are the numbers which are in seconds to perform 1000000 case conversions, so lower is better.
On Solaris 10 (Sunblade 2cpu):
LC(NON-S) LC(SUPPL) UC(NON-S) UC(SUPPL)
1.4.2_08: 0.900 N/A 0.954 N/A
5.0u6: 1.513 2.667 1.427 2.601
Mustang w/fix: 0.445 0.856 0.500 1.028
On Windows XP (Pentium 4 2.5GHz, 1GB memory):
LC(NON-S) LC(SUPPL) UC(NON-S) UC(SUPPL)
1.4.2_09: 0.401 N/A 0.440 N/A
5.0u4: 0.831 1.609 0.821 1.623
Mustang w/fix: 0.450 0.711 0.441 0.701
Test cases are attached to this bug.