Enable zero-allocation conversion between Atom's from different static atom sets
Nobody has claimed this yet.
Assessment
- Difficulty
- 5/5
- Estimated time
- Over a week
- Newbie friendliness
- 35/100
- Issue type
- Feature
- Clarity
- Needs clarification
- Activity status
- Quiet
- Tech stack
- rust
- Domain
- performance
Research direction
Start by reviewing the Atom Hash implementation and the rationale in string-cache issue #224. Determine how hashing Atom content would affect conversions among Atom, Atom, and DefaultAtom. Done means these conversions avoid reallocation while preserving correct interning and hashing behavior.
Written by the indexing model from the issue text.
Description
It would be useful to be able to cheaply convert between an Atom<StyloAtomSet>, an Atom<ServoAtomSet>, a DefaultAtom, etc. This would allow for interop between different crates without a performance penalty and without them all needing to coordinate on which set of static atoms to use.
However currently a dynamically allocated Atom is keyed by it's hash and that hash varies between static atom sets. So converting between Atom types requires reallocating.
I believe that implementing this would involve changing the Hash implementation of Atom to hash the content of the Atom rather than 64 bit value (see also https://github.com/servo/string-cache/issues/224 for why this may be a good anyway). At which point
- Dominant language
- Rust
- Stars
- 212
- Forks
- 84
- Avg merge
- 1d 2h
- Merged PRs (30d)
- 6
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from servo/string-cache
-
Difficulty 5/5 Over a week Newbie friendliness 25/100
servo/string-cache#260 · 6 comments · 1 reaction ·
-
Difficulty 4/5 3-5 days Newbie friendliness 25/100
servo/string-cache#240 · 4 comments ·
-
Difficulty 5/5 Over a week Newbie friendliness 25/100
servo/string-cache#236 · 8 comments ·
-
performance
Difficulty 3/5 1-2 days Newbie friendliness 45/100
servo/string-cache#31 · 2 comments ·
All issues in servo/string-cache
Similar issues
-
todo:perf
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
-
ACP agents get no MCP servers when the thread is created before the project's first worktree loads Openstate:needs triage
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
zed-industries/zed#64611 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
ontola/atomic-server#1625 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
objectionary/phie#154 ·