platform_bionic/libc/tzcode
Elliott Hughes e4d5efe231 strftime: format small positive integers ourselves.
A decent chunk of the logcat profile is spent formatting the timestamps
for each line, and most of that time was going to snprintf(3). We should
find all the places that could benefit from a lighter-weight "format an
integer" and share something between them, but this is easy for now.

Before:

-----------------------------------------------------------
Benchmark                 Time             CPU   Iterations
-----------------------------------------------------------
BM_time_strftime        781 ns          775 ns       893102

After:

-----------------------------------------------------------
Benchmark                 Time             CPU   Iterations
-----------------------------------------------------------
BM_time_strftime        149 ns          147 ns      4750782

Much of the remaining time is in tzset() which seems unfortunate.

Test: treehugger
Change-Id: Ie0f7ee462ff1b1abea6f87d4a9a996d768e51056
2021-12-06 14:55:00 -08:00
..
asctime.c Sync with upstream tzcode (2015g). 2015-10-09 15:15:39 -07:00
bionic.cpp Merge "Track name changes in the tzdata format" 2020-07-22 09:50:10 +00:00
difftime.c Sync with upstream tzcode (2015g). 2015-10-09 15:15:39 -07:00
localtime.c Move localtime.c over to CachedProperty. 2017-04-11 14:44:51 -07:00
private.h Upgrade to tzcode-2016f. 2016-07-29 14:04:17 -07:00
strftime.c strftime: format small positive integers ourselves. 2021-12-06 14:55:00 -08:00
strptime.c Incorporate upstream's strptime %Z/%z support. 2020-09-01 19:11:28 -07:00
tzfile.h Sync with upstream tzcode (2015g). 2015-10-09 15:15:39 -07:00