summaryrefslogtreecommitdiff
path: root/libc/malloc_hooks/malloc_hooks.cpp
diff options
context:
space:
mode:
authorBalaram Makam <b.makam@samsung.com>2019-09-23 14:38:40 -0500
committerElliott Hughes <enh@google.com>2019-09-27 16:41:03 +0000
commit0e670e26a25fa949015d745135f182843abfbfe9 (patch)
tree3170c40a1ee9f4d9c9bb0b3ba406edf8ef157899 /libc/malloc_hooks/malloc_hooks.cpp
parentf5b44a5ea6875d593bccd1a30220ded177fb26ba (diff)
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/malloc_hooks/malloc_hooks.cpp')
0 files changed, 0 insertions, 0 deletions