ea13f8291a92b6f47f50011da1d5e8c107984bc3 |
|
30-Nov-2015 |
Paul Duffin <paulduffin@google.com> |
Switch to latest version of Caliper Convert the benchmarks to the latest version of Caliper. Bug: 24848946 Change-Id: Iac04b30dac61ccb397a6685890da64bae4d3b318
|
a40d2447b6f516116135ee7f126579771ba98a2c |
|
17-Apr-2015 |
Neil Fuller <nfuller@google.com> |
Ensure consistency of capitalization in RelativeDateTimeFormatter Contains refactoring. Benchmarks below to show no appreciable negative performance impact to formatters. We do now cache a new type of formatter. Benchmarks measured in microseconds on mako. Before: DateIntervalFormat_formatDateRange_DATE 244 DateIntervalFormat_formatDateRange_DATE_TIME 256 DateIntervalFormat_formatDateRange_TIME 208 RelativeDateTimeFormatter_getRelativeDateTimeString 207.2 RelativeDateTimeFormatter_getRelativeDateTimeString_ABBREV 218.2 RelativeDateTimeFormatter_getRelativeTimeSpanString 70.5 RelativeDateTimeFormatter_getRelativeTimeSpanString_ABBREV 67.4 After: DateIntervalFormat_formatDateRange_DATE 237 DateIntervalFormat_formatDateRange_DATE_TIME 241 DateIntervalFormat_formatDateRange_TIME 200 RelativeDateTimeFormatter_getRelativeDateTimeString 149.4 RelativeDateTimeFormatter_getRelativeDateTimeString_ABBREV 161.8 RelativeDateTimeFormatter_getRelativeTimeSpanString 71.7 RelativeDateTimeFormatter_getRelativeTimeSpanString_ABBREV 69.0 Bug: 20247811 Change-Id: I51075f89ca6b1d8862335e0e5a4d67a5624edfa6
|
12fbbc16959d078dde23b3b15c8d3d127ef33507 |
|
15-Apr-2015 |
Neil Fuller <nfuller@google.com> |
Use ICU4J more in DateIntervalFormat and RelativeDateTimeFormatter General strategy: Switch to ICU classes for Calendar, and generally use ICU classes earlier to avoid multiple creations. This also incorporates some feedback from narayan@ from https://android-review.googlesource.com/#/c/145662/ Some small optimizations applied but the goal was not to make it much faster, just to confirm it wasn't much slower. It has sped up some methods, and slowed down others, but not much difference in absolute terms. All times in microseconds measured on a mako. Original: RelativeDateTimeFormatter_getRelativeDateTimeString 582.4 RelativeDateTimeFormatter_getRelativeDateTimeString_ABBREV 603.2 RelativeDateTimeFormatter_getRelativeTimeSpanString 39.9 RelativeDateTimeFormatter_getRelativeTimeSpanString_ABBREV 39.1 After: RelativeDateTimeFormatter_getRelativeDateTimeString 207.2 RelativeDateTimeFormatter_getRelativeDateTimeString_ABBREV 218.2 RelativeDateTimeFormatter_getRelativeTimeSpanString 70.5 RelativeDateTimeFormatter_getRelativeTimeSpanString_ABBREV 67.4 Original: DateIntervalFormat_formatDateRange_DATE 290 DateIntervalFormat_formatDateRange_DATE_TIME 298 DateIntervalFormat_formatDateRange_TIME 276 After: DateIntervalFormat_formatDateRange_DATE 244 DateIntervalFormat_formatDateRange_DATE_TIME 256 DateIntervalFormat_formatDateRange_TIME 208 Change-Id: If043bd55ffec37ed2735aa1593f327b38749218c
|
e78392830b4548c65364449441cac3ff16f955f5 |
|
11-Sep-2013 |
Elliott Hughes <enh@google.com> |
icu4c DateIntervalFormat objects are expensive enough that we need to cache them. It takes ~1ms to create a DateIntervalFormat on a z620, and around 8ms on a current mobile device (Nexus 4). Add a small cache of recently-used formatters, using a big lock rather than per-thread caches since this typically only happens on the UI thread anyway, and because all the other frameworks date/time formatting is behind a single lock too. Bug: 10696944 (cherry picked from commit fd1d5e92b2eaf785cb18aa295b7b846cfc5e29af) Change-Id: Iefd573ff6f9851efda0ebe18418dba61fb151e65
|
fd1d5e92b2eaf785cb18aa295b7b846cfc5e29af |
|
11-Sep-2013 |
Elliott Hughes <enh@google.com> |
icu4c DateIntervalFormat objects are expensive enough that we need to cache them. It takes ~1ms to create a DateIntervalFormat on a z620, and around 8ms on a current mobile device (Nexus 4). Add a small cache of recently-used formatters, using a big lock rather than per-thread caches since this typically only happens on the UI thread anyway, and because all the other frameworks date/time formatting is behind a single lock too. Bug: 10696944 Change-Id: I8ccbe0b31b722a95a08fbc5a119173b7a0f44807
|