Use quicksort to sort the string pool.
The current implementation of Vector::sort uses insertion sort on the assumption that the data is mostly sorted. It isn't. This change brings the total time spent sorting packages by config down to 500ms from about 93 seconds. Bug: 6186278 Change-Id: Iec8da11e09297acd6c73733d063b0fa9dacf69f7
This commit is contained in:
@ -139,7 +139,7 @@ public:
|
||||
const Vector<size_t>* offsetsForString(const String16& val) const;
|
||||
|
||||
private:
|
||||
static int config_sort(const size_t* lhs, const size_t* rhs, void* state);
|
||||
static int config_sort(void* state, const void* lhs, const void* rhs);
|
||||
|
||||
const bool mUTF8;
|
||||
|
||||
|
Reference in New Issue
Block a user