-
Notifications
You must be signed in to change notification settings - Fork 107
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Another LRU crate #93
Comments
Hi @marmeladema! It's no bother at all! I just took a look at your crate, and I think it's a great approach! I'd be happy to add a comment to the README linking to it and explaining the differences between the two. The way I see it, the two crates occupy slightly different positions on the spectrum of performance and usability. |
Thank you for taking the time to look at the code! Really appreciate it!
Wow that would be super nice 👍 Maybe it's a bit too soon though, I'd like some more people to look at it / use it.
The keys are moved in a |
Sounds good. We can circle back whenever you feel it's ready!
That was all I could think of too. And I agree, it certainly seems like the difference would be negligible. |
By the way, I haven't tagged a new release yet, but |
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:
HashMap
collection 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:
Rc
and nothing else is boxed&str
to fetch a value with aString
key #85: the API being similar toHashMap
it should be possible to use a&str
to fetch a value with aString
keyOn 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!
The text was updated successfully, but these errors were encountered: