summaryrefslogtreecommitdiff
path: root/libs/androidfw/StringPool.cpp
diff options
context:
space:
mode:
author Jared Duke <jdduke@google.com> 2024-12-10 01:06:04 +0000
committer Jared Duke <jdduke@google.com> 2024-12-10 01:15:02 +0000
commit4e2e739b6130f8c7a6c7274f39d83bccc1a201d1 (patch)
tree000b02544af9e7548f8fdda1cdb35719b430bafb /libs/androidfw/StringPool.cpp
parent97364210bd7704ceb994c57f35fd945b743ed478 (diff)
Optimize SystemFeaturesMetadata index lookup
Using a ~150 length string->int switch statement lookup turns out to be both slower than an equivalent ArraySet lookup, and larger in terms of code size (both dex + compiled). Switch to using a static ArraySet (initialized in the zygote) for efficiency. A follow-up change will add a microbenchmark for further validation. Bug: 203143243 Test: m + presubmit + compare dex/odex/runtime perf Flag: EXEMPT refactor Change-Id: I1231149b928488cb716ec09a33ef1ec4ac7e2785
Diffstat (limited to 'libs/androidfw/StringPool.cpp')
0 files changed, 0 insertions, 0 deletions