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

Skip to content
Commit 6f8b34dc authored by Christopher R. Palmer's avatar Christopher R. Palmer Committed by Sam Mortimer
Browse files

aapt: Use a std::map instead of a SortedVector

Android's SortedVectorImpl uses arrays that it must
insert into the middle of.  Each insertion is O(N) time
because it must move on average half the elements of
the array to make room for the new element.  That is,
O(N^2) time to build this sorted vector.

std::map on the other hand normally uses red/black
trees and has a cost of NlogN to add N elements to it.

Change-Id: I5da0363ba806ab615b2aad0fb2a43ef9a9bec327
parent e69c0e91
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