Skip to content

Commit 3ca882a

Browse files
committed
Faster str interning
Signed-off-by: Adam Gutglick <adam@spiraldb.com>
1 parent 170ff39 commit 3ca882a

2 files changed

Lines changed: 4 additions & 2 deletions

File tree

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -174,7 +174,7 @@ jetscii = "0.5.3"
174174
jiff = "0.2.0"
175175
jni = { version = "0.22.0" }
176176
kanal = "0.1.1"
177-
lasso = { version = "0.7", features = ["multi-threaded"] }
177+
lasso = { version = "0.7", features = ["multi-threaded", "inline-more"] }
178178
lending-iterator = "0.1.7"
179179
libfuzzer-sys = "0.4"
180180
libloading = "0.8"

vortex-session/src/registry.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,12 @@ use lasso::Spur;
1919
use lasso::ThreadedRodeo;
2020
use parking_lot::RwLock;
2121
use vortex_error::VortexExpect;
22+
use vortex_utils::aliases::DefaultHashBuilder;
2223
use vortex_utils::aliases::dash_map::DashMap;
2324

2425
/// Global string interner for [`Id`] values.
25-
static INTERNER: LazyLock<ThreadedRodeo> = LazyLock::new(ThreadedRodeo::new);
26+
static INTERNER: LazyLock<ThreadedRodeo<Spur, DefaultHashBuilder>> =
27+
LazyLock::new(|| ThreadedRodeo::with_hasher(DefaultHashBuilder::default()));
2628

2729
/// A lightweight, copyable identifier backed by a global string interner.
2830
///

0 commit comments

Comments
 (0)