commit | 2ad85f032327c99c38d00bf97631d7af66201058 | [log] [tgz] |
---|---|---|
author | Riddle Hsu <riddlehsu@google.com> | Thu Dec 16 18:12:34 2021 +0800 |
committer | Riddle Hsu <riddlehsu@google.com> | Thu Dec 16 18:15:41 2021 +0800 |
tree | 3e623f36356bd1f02f02d80a8325a9dd4bffb429 | |
parent | 9975e2c41290a1c7bfed1c345beed4f925acf5fa [diff] |
Use hand written hasCode for ChangeIdStateQuery Because Objects.hash(Object... values) will always create an array to wrap the "..." arguments, with additional auto-boxing for all primitive type arguments. This can reduce the execution time of ChangeIdStateQuery#hashCode() by 8 times, which is usually the main cost of CompatChanges#isChangeEnabled. Bug: 208449209 Test: atest android.app.compat.CompatChangesTest Change-Id: I863aa1d35e7448b5a965368272198c4529253ae0