diff options
author | Narayan Kamath <narayan@google.com> | 2014-11-13 12:33:04 +0000 |
---|---|---|
committer | Narayan Kamath <narayan@google.com> | 2014-11-14 10:09:24 +0000 |
commit | 8d471d854e0b66d079014519b562e673f8762995 (patch) | |
tree | 910a999e30c81744631da50d6431ced85b1cad38 /support | |
parent | 258e3d158c9a876307d5111972f7e9f1ad87b076 (diff) | |
download | libcore-8d471d854e0b66d079014519b562e673f8762995.zip libcore-8d471d854e0b66d079014519b562e673f8762995.tar.gz libcore-8d471d854e0b66d079014519b562e673f8762995.tar.bz2 |
Binary search through ArtFields to match by name.
Commit bfa3ed0ad988e1da13626ddbaf6dcae0c58ea79e in art preserves
the original field order for ArtFields, and they will therefore be
sorted by name. For classes with large numbers of static and instance
fields, a binary search is obviously much faster.
Before:
Scenario{vm=app_process, trial=0, benchmark=GetInstanceField} 275460.26 ns; σ=19.75 ns @ 3 trials
Scenario{vm=app_process, trial=0, benchmark=GetStaticField} 661690.26 ns; σ=6340.84 ns @ 5 trials
After:
Scenario{vm=app_process, trial=0, benchmark=GetInstanceField} 3502.96 ns; σ=32.15 ns @ 3 trials
Scenario{vm=app_process, trial=0, benchmark=GetStaticField} 6579.58 ns; σ=40.49 ns @ 3 trials
bug: 18211592
Change-Id: I8f979de62ffe37d1c7d5c721717d2f3501e7c9e6
Diffstat (limited to 'support')
0 files changed, 0 insertions, 0 deletions