Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit 5a744684 authored by Erick Reyes's avatar Erick Reyes
Browse files

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: default avatarErick Reyes <erickreyes@google.com>
parent 949a561c
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment