Mike Gerwitz

Activist for User Freedom

diff options
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/Cargo.toml
parent176d099fb61a49492515a0fd35fc19b4f2b70ce9 (diff)
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/Cargo.toml')
1 files changed, 3 insertions, 2 deletions
diff --git a/tamer/Cargo.toml b/tamer/Cargo.toml
index a758e5d..64519f9 100644
--- a/tamer/Cargo.toml
+++ b/tamer/Cargo.toml
@@ -23,8 +23,9 @@ lto = true
lto = true
+bumpalo = ">= 2.6.0"
+# used by petgraph
+fixedbitset = ">= 0.1"
fxhash = ">= 0.2.1"
petgraph = ">= 0.4.13"
quick-xml = ">= 0.17.0"
-# used by petgraph
-fixedbitset = ">= 0.1"