diff options
author | Erick Reyes <erickreyes@google.com> | 2019-02-28 18:22:24 -0800 |
---|---|---|
committer | Erick Reyes <erickreyes@google.com> | 2019-03-01 16:17:20 -0800 |
commit | 5a744684c3feab43f47721916d339b9111b1fd88 (patch) | |
tree | b7e1cb9dce18c3f156b5cd227aba56f6a09fe949 /libunwindstack/tests/MemoryFileTest.cpp | |
parent | 949a561cfaf96840101901c6c9448dd3e859a4bd (diff) |
libmeminfo: librank optimization using maps instead of vectors
librank was calling std::vector::find_if in nested loops when iterating
through processes and maps.
Changed the implementation to use std::map::insert, this resulted in
a significant improvement to execution speed.
Test: time librank on crosshatch
Before: 1m22.57s real 1m15.87s user 0m05.79s system
After: 0m03.85s real 0m00.88s user 0m02.92s system
Bug: 124523194
Change-Id: I2b519d0bfd7f7929c6c4c6c2374794cb1a744585
Signed-off-by: Erick Reyes <erickreyes@google.com>
Diffstat (limited to 'libunwindstack/tests/MemoryFileTest.cpp')
0 files changed, 0 insertions, 0 deletions