aboutsummaryrefslogtreecommitdiffstats
path: root/libc/bionic/environ.cpp
diff options
context:
space:
mode:
authorBalaram Makam <b.makam@samsung.com>2019-09-23 14:38:40 -0500
committerLuca Stefani <luca.stefani.ge1@gmail.com>2019-11-28 11:33:18 +0100
commit0cbc6b0e2c2a6b339274bcce032d77e64f6da817 (patch)
tree03bf88ba9424b864e6131e1bd13ae40ffc0ecdfb /libc/bionic/environ.cpp
parent3ae72e5daf36a1b1ee75f7e217f7a0cfc9241645 (diff)
downloadandroid_bionic-0cbc6b0e2c2a6b339274bcce032d77e64f6da817.tar.gz
android_bionic-0cbc6b0e2c2a6b339274bcce032d77e64f6da817.tar.bz2
android_bionic-0cbc6b0e2c2a6b339274bcce032d77e64f6da817.zip
ASCII fastpath for towupper and towlower.
This change elides unnecessary calls to __find_icu_symbol for ASCII chars and improves PUBG mobile game loading time by 7% on hikey620(Cortex-A53): name old time/op new time/op delta PUBG_0.13.0_Launch 41.5s ± 2% 37.7s ± 3% -9.24% (p=0.008 n=5+5) Below are the bionic benchmark results on a Pixel 2 XL for 64-bit, showing a large speedup for ASCII and only a small slowdown for non-ASCII. Before: BM_wctype_towlower_ascii_n 10.5 ns 10.4 ns 61973065 BM_wctype_towlower_ascii_y 10.2 ns 10.2 ns 70158659 BM_wctype_towlower_unicode_n 10.3 ns 10.3 ns 67719478 BM_wctype_towlower_unicode_y 10.6 ns 10.5 ns 67841545 BM_wctype_towupper_ascii_n 10.8 ns 10.8 ns 63456778 BM_wctype_towupper_ascii_y 10.9 ns 10.9 ns 65116910 BM_wctype_towupper_unicode_n 10.7 ns 10.7 ns 67463276 BM_wctype_towupper_unicode_y 10.4 ns 10.4 ns 66467890 After: BM_wctype_towlower_ascii_n 3.35 ns 3.34 ns 205567652 BM_wctype_towlower_ascii_y 3.30 ns 3.29 ns 214108746 BM_wctype_towlower_unicode_n 10.9 ns 10.8 ns 65007743 BM_wctype_towlower_unicode_y 10.6 ns 10.6 ns 63819060 BM_wctype_towupper_ascii_n 3.53 ns 3.53 ns 195944444 BM_wctype_towupper_ascii_y 3.48 ns 3.48 ns 199233248 BM_wctype_towupper_unicode_n 11.1 ns 11.1 ns 62760216 BM_wctype_towupper_unicode_y 11.0 ns 11.0 ns 61608872 Test: bionic unit tests on device Test: bionic benchmarks on device Signed-off-by: Balaram Makam <b.makam@samsung.com> Change-Id: I77ab7efb66d7bcb35d00467663607535e5c1992f
Diffstat (limited to 'libc/bionic/environ.cpp')
0 files changed, 0 insertions, 0 deletions