Re:Box to Save Memory in Rust
by MrBuddyCasino on Monday April 27, 2026 @03:51AM
(#47918843)
Atoms: is this similar to interned strings?
[ Parent
| on HN ]
Re:Box to Save Memory in Rust
by locknitpicker on Monday April 27, 2026 @04:02AM
(#47918911)
> Atoms: is this similar to interned strings?
Yes. It is exactly how they are described.
https://docs.rs/string_cache/latest/string_cache/struct.Atom...
> Represents a string that has been interned.
Re:Box to Save Memory in Rust
by ben-schaaf on Monday April 27, 2026 @09:10AM
(#47921117)
The names of these things are hazy and inconsistent. In Java and C# an interned string is the same type as other strings. Others describe atoms as interned strings, some call them symbols. At my work we call the u16/u32 atoms and interned strings are the single pointer strings described above.