mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-03-01 05:48:26 +00:00

The current order of re-using regions from non-full runs relies on the run's position in memory via a RedBlackTree. This leads to O(log(n)) complexity for the tree book-keeping and walking while providing a somewhat arbitrary order when doing GetNonFullBinRun. We can reduce the complexity here by using a DoublyLinkedList for mNonFullRuns. The resulting LIFO order seems to have beneficial effects for common gecko use cases, too. Differential Revision: https://phabricator.services.mozilla.com/D225533