Mike Gerwitz

Activist for User Freedom

aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMike Gerwitz <mike.gerwitz@ryansg.com>2019-12-23 23:26:42 -0500
committerMike Gerwitz <mike.gerwitz@ryansg.com>2020-02-24 14:56:28 -0500
commit1f4db84f248332a1a891e4d9b7ca28cf3afc547d (patch)
tree73dd8525689fda1b346a1ab05f4e642eed3a76f4 /tamer/src/ld/poc.rs
parent176d099fb61a49492515a0fd35fc19b4f2b70ce9 (diff)
downloadtame-1f4db84f248332a1a891e4d9b7ca28cf3afc547d.tar.gz
tame-1f4db84f248332a1a891e4d9b7ca28cf3afc547d.tar.bz2
tame-1f4db84f248332a1a891e4d9b7ca28cf3afc547d.zip
TAMER: Arena-based string interner
Contrary to what I said previously, this replaces the previous implementation with an arena-backed internment system. The motivation for this change was investigating how Rustc performed its string interning, and why they chose to associate integer identifiers with symbols. The intent was originally to use Rustc's arena allocator directly, but that create pulled in far too many dependencies and depended on nightly Rust. Bumpalo provides a very similar implementation to Rustc's DroplessArena, so I went with that instead. Rustc also relies on a global, singleton interner. I do not do that here. Instead, the returned Symbol carries a lifetime of the underlying arena, as well as a pointer to the interned string. Now that this is put to rest, it's time to move on.
Diffstat (limited to 'tamer/src/ld/poc.rs')
0 files changed, 0 insertions, 0 deletions