Commit 5346a96c authored by Narayan Kamath's avatar Narayan Kamath
Browse files

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

(cherry picked from commit 8d471d85)

Change-Id: I098192a217f858dcbb6f60472b5ad1c0d72906ee
parent 5dbbe831
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment