Skip to content

libstore: use set instead of list for waiter list#5106

Merged
edolstra merged 1 commit intoNixOS:masterfrom
andir:libstore-waiter-set
Aug 9, 2021
Merged

libstore: use set instead of list for waiter list#5106
edolstra merged 1 commit intoNixOS:masterfrom
andir:libstore-waiter-set

Conversation

@andir
Copy link
Member

@andir andir commented Aug 8, 2021

This replaces the O(n) search complexity in our insert code with a
lookup of O(log n). It also makes removing waitees easier as we can use
the extract method provided by the set class.

This replaces the O(n) search complexity in our insert code with a
lookup of O(log n). It also makes removing waitees easier as we can use
the extract method provided by the set class.
@edolstra edolstra merged commit 873df3a into NixOS:master Aug 9, 2021
@edolstra
Copy link
Member

edolstra commented Aug 9, 2021

Thanks, didn't know about std::owner_less!

@andir andir deleted the libstore-waiter-set branch August 9, 2021 12:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants