You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm mostly just curious. I wonder if it would be worth considering using a parallel hashmap? In my own project, I'm eventually going to need to intern things other than strings. Is there a reason the generic interner from the syntax crate wasn't appropriate for servo's strings? Could the generic interner be improved to the point of being suitable?
The text was updated successfully, but these errors were encountered:
Is there a reason the generic interner from the syntax crate wasn't appropriate for servo's strings?
It's not something that's exposed (it's unstable).
The custom hashtable is presumably because we don't expect hashes to clash often so we're using a chained hashtable instead of a probing one. I'm not sure.
I started typing up how a custom hash map allows Atom::drop to remove a map entry a dynamic atom’s reference count hits zero, but now I think that’d also work with a standard HashMap, only the refcounting needs to be custom.
So I think HashMap would probably work. I don’t know if it’d perform better or worse.
around about here
string-cache/src/atom.rs
Line 43 in 4f8310c
I'm mostly just curious. I wonder if it would be worth considering using a parallel hashmap? In my own project, I'm eventually going to need to intern things other than strings. Is there a reason the generic interner from the syntax crate wasn't appropriate for servo's strings? Could the generic interner be improved to the point of being suitable?
The text was updated successfully, but these errors were encountered: