b07812780bdb1aee50fae61cfa5f42be10dc8cfb |
|
17-Feb-2017 |
Vladimir Marko <vmarko@google.com> |
Do not use String.setCharAt() in CaseMapper. The internal API String.setCharAt() breaks the assumption that strings are really immutable. That in turn breaks string compression invariants - compressible strings must be compressed. This is a first step of removing this API. We now do an extra allocation for those paths where we previously used a modifiable String but on the other hand we avoid repeated JNI calls when mapping longer strings. Relevant cases from StringCaseMappingBenchmark: (Lower is better.) timeToLowerCase_US/UPPER2: 443.46 -> 376.47 (-15%) timeToLowerCase_US/MIXED2: 441.58 -> 358.37 (-19%) timeToLowerCase_US/UPPER8: 1062.30 -> 548.56 (-48%) timeToLowerCase_US/MIXED8: 896.00 -> 550.03 (-39%) timeToLowerCase_US/UPPER32: 5175.08 -> 1502.36 (-71%) timeToLowerCase_US/MIXED32: 2743.20 -> 1387.55 (-49%) timeToLowerCase_US/UPPER512: 68071.45 -> 18709.82 (-73%) timeToLowerCase_US/MIXED512: 46786.96 -> 18748.79 (-59%) timeToUpperCase_US/LOWER2: 602.21 -> 706.88 (+17%) timeToUpperCase_US/MIXED2: 511.35 -> 773.32 (+51%) timeToUpperCase_US/LOWER8: 1194.41 -> 989.79 (-20%) timeToUpperCase_US/MIXED8: 1113.68 -> 1033.80 (-13%) timeToUpperCase_US/LOWER32: 4899.31 -> 2246.14 (-54%) timeToUpperCase_US/MIXED32: 3469.12 -> 2455.02 (-30%) timeToUpperCase_US/LOWER512: 76607.06 -> 25412.57 (-67%) timeToUpperCase_US/MIXED512: 55735.11 -> 26115.87 (-56%) There was a lot of noise, especially in the short string benchmarks, for example the timeToLowerCase_US/LOWER2 which should have been unaffected (not listed above) had +35%. The timeToUpperCase_US/LOWER2 from this report seems to be on the low end of the range while timeToUpperCase_US/MIXED2 hit the high end of the range. The timings for long strings are much more consistent. Test: testrunner.sh --host Test: run-libcore-tests.sh --mode=host Bug: 31040547 Change-Id: Id107428c000de1ff3db94b4824f70bf3ae5001dc
|
728029941ba340aeb8e4098b7ad12d3a30e38aa9 |
|
05-Oct-2015 |
Neil Fuller <nfuller@google.com> |
Switch from jarjar to generated source for ICU4J Future changes will include ICU4J classes as public APIs (still beneath android.icu). To generate these docs source code will be needed under the expected package (android.icu), as well as the ability to apply changes to the javadoc comments programatically so ICU can be upgraded easily. A consequence of this change is that libcore code can now depend on icu in the android.icu package and not the com.ibm.icu package as was the case previously. A nice side effect is that the source code is available for use during debugging as well. Bug: 22023363 Change-Id: Icba5668fae53e2dc98ccc74e2f1ad1ca226e5feb
|
17552b6592aeaaa564725a07e10e8c4b1c8163cb |
|
14-Jul-2015 |
Rayhaan Jaufeerally <rayhaan@google.com> |
Remove Transliterator wrapper class. This change removes the wrapper class in Java which was used for proxying requests to ICU4c. Now ICU4J is called directly at the call sites. See: https://android-review.googlesource.com/#/c/162002/ This is done by replacing instantiations of the old Transliterator class with calls to a static factory in ICU4J which returns a cached transliterator if available, otherwise creates it on demand. This change requires that the transliterator resource directories and source files are added to our java libraries, which increases the size of core-libart.jar from 2.289 MB to 2.332 MB. Maybe it's possible to wait until dependencies on ICU4c have been removed to see if we can save space there. Change-Id: I2b2f84a051ba9815ba6d346dfe7fb764e39032c4
|
83c7414449bc406b581f0cb81ae06e7bce91403c |
|
15-Jan-2014 |
Jeff Hao <jeffhao@google.com> |
Removed offset and value from String and added StringFactory. Change-Id: I55314ceb906d0bf7e78545dcd9bc3489a5baf03f
|