-
Notifications
You must be signed in to change notification settings - Fork 35
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
Add FrozenIndexMap and FrozenIndexSet #10
Conversation
example: StringInterner
Cargo.toml
Outdated
@@ -10,5 +10,9 @@ repository = "https://github.com/manishearth/elsa" | |||
keywords = ["data-structure", "map", "frozen", "cache", "arena"] | |||
categories = ["data-structures", "caching"] | |||
|
|||
[features] | |||
default = ["indexmap"] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should the feature be on by default, or not?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No extra dependencies by default, please
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Manishearth fixed
I did the right Cargo.toml, travis and README changes for the string_interner example. (in the last commit) |
a38f8b2
to
0a46740
Compare
Looks great, thank you! Sorry for the delay in reviewing! |
Feel free to open a PR that releases version 1.4 |
@Manishearth, I took the liberty of putting up the bump PR (#11) because I would really like to use |
Closes #6
The
StringInterner::get_or_intern
has an unnecessary call toto_string
which allocates. There is no clean workaround, AFAIK. We would need an improved Entry API. See also ideas such asentry_or_clone
: Extend entry API to work on borrowed keys rust-lang/rfcs#1769Yet another nice-to-have thing would be a stable custom allocation story. With custom allocators, we could easily replace the meat of the
string_interner
crate. Each interner would hold its own allocator, thereby gaining top performance.