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:
Jacek Sieka 2024-06-11 08:43:41 +02:00 committed by GitHub
parent a0a53c9116
commit 28743363ff
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 296 additions and 316 deletions

File diff suppressed because it is too large Load Diff