a5744e213f
This benchmarks mapping property prefixes to property contexts with two algorithms: the 'Legacy' method used before Android P and the 'Trie' used afterwards (the code in this directory). It uses input mappings from both Oreo and the latest in AOSP ('S'). Note that there is nearly a 10x increase in the number of mappings in S as there was in Oreo, which was predicted when the trie was designed. Results on cuttlefish: ----------------------------------------------------------- Benchmark Time CPU Iterations ----------------------------------------------------------- LegacyLookupOreo 683576 ns 673538 ns 1060 LegacyLookupS 5683109 ns 5596982 ns 124 TrieLookupOreo 299851 ns 295696 ns 2378 TrieLookupS 584831 ns 576801 ns 1204 The results show that the legacy look up uses 8.3x more CPU time to handle the number of mappings added through S, whereas the Trie lookup uses less than 2x more CPU time, showing that the trie scales better with added mappings. Test: run this benchmark Change-Id: I35c3aa4429f049e327a891f9cbe1901d8855d7ba |
||
---|---|---|
.. | ||
include/system_properties | ||
Android.bp | ||
context_lookup_benchmark.cpp | ||
context_lookup_benchmark_data.h | ||
context_node.cpp | ||
contexts_serialized.cpp | ||
contexts_split.cpp | ||
prop_area.cpp | ||
prop_info.cpp | ||
prop_trace.cpp | ||
system_properties.cpp |