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
Loading
Please register or sign in to comment