Hello @jeromefroe and sorry to bother you!
I have been looking for an LRU cache with O(1) operations and found your crate but decided as an exercise to implement my own: https://github.com/marmeladema/clru-rs
I wonder if you could take a quick look and tell me what you think of it?
As outlined in the README, the main differences are:
- Smaller amount of unsafe code.
- API closer to the standard
HashMap collection which allows to lookup with Borrow-ed version of the key.
Technically, it might address some issues opened in this crate, while certainly introducing a lot new ones :-)
Namely:
On the implementation side, it relies on a regular HashMap and a linked-list stored in a vector.
I understand its quite an unusual way to contact people, please forgive me.
Thank you in advance!
Hello @jeromefroe and sorry to bother you!
I have been looking for an LRU cache with O(1) operations and found your crate but decided as an exercise to implement my own: https://github.com/marmeladema/clru-rs
I wonder if you could take a quick look and tell me what you think of it?
As outlined in the README, the main differences are:
HashMapcollection which allows to lookup withBorrow-ed version of the key.Technically, it might address some issues opened in this crate, while certainly introducing a lot new ones :-)
Namely:
Rcand nothing else is boxed&strto fetch a value with aStringkey #85: the API being similar toHashMapit should be possible to use a&strto fetch a value with aStringkeyOn the implementation side, it relies on a regular
HashMapand a linked-list stored in a vector.I understand its quite an unusual way to contact people, please forgive me.
Thank you in advance!