Skip to content

Commit 65e36e5

Browse files
committed
feat!: Optimize JSON key deserialization with arena-based interning
- Add KeyArena in src/string.rs for per-document string deduplication - Refactor Value deserialization to intern object keys via ValueSeed - Ensure no_std compatibility with hashbrown + FxHasher - Add unit test confirming Rc<str> reuse across deserialized objects - Update Cargo.toml with hashbrown and rustc-hash dependencies Signed-off-by: Anand Krishnamoorthi <anakrish@microsoft.com>
1 parent 1e4ff95 commit 65e36e5

11 files changed

Lines changed: 1297 additions & 1581 deletions

File tree

Cargo.lock

Lines changed: 245 additions & 290 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ rand = ["dep:rand"]
9292

9393
[dependencies]
9494
anyhow = { version = "1.0.45", default-features = false }
95-
serde = {version = "1.0.150", default-features = false, features = ["derive", "rc"] }
95+
serde = {version = "1.0.150", default-features = false, features = ["derive", "rc", "alloc"] }
9696
serde_json = { version = "1.0.89", default-features = false, features = ["alloc"] }
9797
lazy_static = { version = "1.4.0", default-features = false }
9898
thiserror = { version = "2.0", default-features = false }
@@ -117,7 +117,9 @@ rand = { version = "0.9.0", default-features = false, features = ["thread_rng"],
117117
# Causes the project to link with the Spectre-mitigated CRT and libs.
118118
msvc_spectre_libs = { version = "0.1", features = ["error"], optional = true }
119119
dashmap = { version = "6.1", default-features = false, optional = true }
120+
hashbrown = { version = "0.15", default-features = false }
120121
mimalloc = { path = "mimalloc", optional = true }
122+
rustc-hash = { version = "1.1", default-features = false }
121123

122124
[dev-dependencies]
123125
anyhow = "1.0.45"

0 commit comments

Comments
 (0)