Conversation
c8531d9 to
c4ff948
Compare
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
c4ff948 to
e2ee492
Compare
…fficiency Major optimizations: **SmartString** - Custom SSO string replacing CompactString - Inline storage for strings ≤22 bytes (no heap allocation) - Owned (Box<str>) for computed values, Shared (Arc<str>) for cloned values - 24-byte size with O(1) clone for shared variant **I64Map** - High-performance hashmap for i64 keys - Uses i64::MIN as empty sentinel (row/txn IDs are always ≥0) - FxHash-based with linear probing and backward-shift deletion - ~45% faster lookups than FxHashMap<i64, V> **Value Interning** - Shared instances for common values - Interned: NULL (all 7 DataTypes), booleans, integers 0-1000 - Reduces allocations for frequently used values in rows **Aggregation Fixes & Optimizations** - Fixed hash collision bug in single-column GROUP BY (was using hash as key) - Added 2-column tuple optimization (30% faster than Vec<Value>) - Single-column primitive GROUP BY uses I64Map directly **SIMD Pattern Matching** - memchr::memmem for LIKE '%pattern%' substring search - Pre-compiled Finder stored in CompiledPattern **Other Improvements** - CompactVec: new insert(), retain(), drain() methods - All indexes migrated to I64Map and CompactVec - Thorough SAFETY documentation on unsafe code
e2ee492 to
f7ceb1a
Compare
mmacedoeu
pushed a commit
to mmacedoeu/stoolap
that referenced
this pull request
Mar 2, 2026
…fficiency (stoolap#10) Major optimizations: **SmartString** - Custom SSO string replacing CompactString - Inline storage for strings ≤22 bytes (no heap allocation) - Owned (Box<str>) for computed values, Shared (Arc<str>) for cloned values - 24-byte size with O(1) clone for shared variant **I64Map** - High-performance hashmap for i64 keys - Uses i64::MIN as empty sentinel (row/txn IDs are always ≥0) - FxHash-based with linear probing and backward-shift deletion - ~45% faster lookups than FxHashMap<i64, V> **Value Interning** - Shared instances for common values - Interned: NULL (all 7 DataTypes), booleans, integers 0-1000 - Reduces allocations for frequently used values in rows **Aggregation Fixes & Optimizations** - Fixed hash collision bug in single-column GROUP BY (was using hash as key) - Added 2-column tuple optimization (30% faster than Vec<Value>) - Single-column primitive GROUP BY uses I64Map directly **SIMD Pattern Matching** - memchr::memmem for LIKE '%pattern%' substring search - Pre-compiled Finder stored in CompiledPattern **Other Improvements** - CompactVec: new insert(), retain(), drain() methods - All indexes migrated to I64Map and CompactVec - Thorough SAFETY documentation on unsafe code
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Changes
New Data Structures
SmartString- 24-byte SSO string with O(1) clone for shared variantI64Map- Linear probing hashmap with backward-shift deletionvalue_interner- Global interning for common Value instancesPerformance Optimizations
Bug Fixes
Code Quality
Test plan
cargo nextest run)