mirror of
https://github.com/status-im/nim-stew.git
synced 2025-01-09 11:45:42 +00:00
keyed_queue: avoid copies, lookups (#220)
This change avoids many superfluous data copies and lookups by exploiting `withValue` thus performing only one lookup with the same key (instead of hasKey + actual lookup). We also avoid several copies of the value which often is copied even though only the next/prev pointers from the item are needed, for examle during shifting and lru-appending.
This commit is contained in:
parent
a0a53c9116
commit
28743363ff
File diff suppressed because it is too large
Load Diff
Loading…
x
Reference in New Issue
Block a user