Skip to content

Commit a56aaf5

Browse files
committed
8.0.0
### LargeBPlusTree - Self-balancing B+Tree for sorted key-value storage - O(log n) insert, delete, and lookup operations - Efficient range queries with in-order iteration - Factory methods for ascending/descending order with struct comparers ### LargeKDTree - High-performance KD-Tree for spatial indexing - Implicit array layout (no pointer chasing) - Allocation-free nearest neighbor and range queries - Struct-based point accessors for JIT devirtualization ### LargeBKDTree - Block-based KD-Tree variant for large point sets - Optimized for range queries and bounding box searches ## Hash Collections (LargeSet, LargeDictionary) - Replaced open addressing with **separate chaining** - Index-based linking using `HashEntry<T>` struct (similar to .NET Dictionary) - Free-list for efficient entry reuse after deletions - Extend capacity **before** adding to avoid mid-operation rehashing ## Enumerator Optimizations - New `LargeStorageEnumerator<T>` struct enumerator for LargeList - New `LargeSpanEnumerator<T>` and `ReadOnlyLargeSpanEnumerator<T>` - Direct chunk-by-chunk storage access instead of yield-based iteration - `GetEnumerator()` now returns struct enumerator for foreach optimization ## Storage Optimizations - `StorageGetRef`, `StorageGet`, `StorageSet`: Inline index calculation (removed `StorageGetIndex` call) - `StorageSwap`: Direct index computation instead of 4 method calls - New `GetStructEnumerator()` and `AsStructEnumerable()` extension methods ## Other Changes - Removed unnecessary `[MethodImpl(AggressiveInlining)]` from yield-based methods - Updated README with user-friendly descriptions - Added PackageTags: BPlusTree, KDTree, BKDTree, SpatialIndex, RangeQuery, NearestNeighbor
1 parent b86d4c7 commit a56aaf5

27 files changed

Lines changed: 9301 additions & 433 deletions

LargeCollections.Test/LargeBKDTreeTest.cs

Lines changed: 1376 additions & 0 deletions
Large diffs are not rendered by default.

LargeCollections.Test/LargeBPlusTreeTest.cs

Lines changed: 1162 additions & 0 deletions
Large diffs are not rendered by default.

LargeCollections.Test/LargeDictionaryTest.cs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -224,6 +224,12 @@ public async Task AddRange_IEnumerable_Branches(long capacity)
224224
public async Task AddRange_IReadOnlyLargeArray_Overloads(long capacity)
225225
{
226226
long actualCapacity = Math.Max(1L, Math.Min(capacity, Constants.MaxLargeCollectionCount));
227+
228+
// Skip test at max capacity - open addressing cannot extend when table is full
229+
// and this test tries to add duplicate ranges which would require extension
230+
if (actualCapacity >= Constants.MaxLargeCollectionCount)
231+
return;
232+
227233
var dictionary = LargeDictionary.Create<long, long>(capacity: actualCapacity);
228234

229235
LargeArray<KeyValuePair<long, long>> array = CreateSequentialPairs(actualCapacity);

0 commit comments

Comments
 (0)