Skip to content

fix(pooled): throw ObjectDisposedException from Count/Keys/Values after Dispose (#296) - #299

Merged
marius-bughiu merged 1 commit into
mainfrom
fix/issue-296-pooled-disposed-accessors
Jul 24, 2026
Merged

fix(pooled): throw ObjectDisposedException from Count/Keys/Values after Dispose (#296)#299
marius-bughiu merged 1 commit into
mainfrom
fix/issue-296-pooled-disposed-accessors

Conversation

@marius-bughiu

Copy link
Copy Markdown
Owner

What & why

PooledCelerityDictionary and PooledCeleritySet both document — in the class <remarks>, the _disposed field comment, and the Dispose() summary — that "after Dispose every member throws ObjectDisposedException." Several read accessors did not honour that contract:

  • PooledCelerityDictionary.Count, Keys, Values
  • PooledCeleritySet.Count

Dispose() sets _count = 0 and returns the backing key/value arrays to ArrayPool<T>.Shared. So a post-dispose Count read returned a silent 0, and Keys / Values handed back a view over arrays already back in the pool — potentially observing buffers the pool has since re-handed to another caller. That is a correctness/robustness gap, not just a doc nit. Fixes #296.

The fix routes all four accessors through the existing ThrowIfDisposed() guard that the rest of each type's surface already uses, so the code now matches the long-documented contract. No behaviour change before disposal.

Parity checklist (bug fix)

  • (a) Dedicated tests — extended the existing UseAfterDispose_ShouldThrowObjectDisposedException fact in PooledCelerityDictionaryTests (adds Count / Keys / Values, plus the previously-missing EnsureCapacity / TrimExcess) and PooledCeleritySetTests (adds Count). These assertions fail on main.
  • (b) Cross-collection shared tests — N/A: the two pooled types are the only IDisposable collections and there is no shared use-after-dispose test to extend.
  • (c) Benchmarks / (d) dashboard — N/A: no perf or public-shape change.
  • (e) Docs — no change: docs/api/collections.md already states "after it every member throws ObjectDisposedException" for both pooled types; this fix makes the code match the already-correct docs.
  • (f) CHANGELOG — added a ### Fixed bullet under [Unreleased].
  • (g) ROADMAP — N/A: pooled collections already shipped/done.

Test plan

  • dotnet build (net8.0) — clean, 0 warnings.
  • dotnet test (net8.0) — full suite 4263 passed, 0 failed; pooled subset 233 passed.
  • CI matrix (net8.0 / net9.0 / net10.0 × Windows / Linux / macOS) green.
  • No gh-pages dashboard refresh needed (no benchmark/collection surface change).

🤖 Generated with Claude Code

Copilot AI review requested due to automatic review settings July 23, 2026 01:10

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Note

Copilot couldn't run its full agentic review because it didn't start before the timeout. Make sure your repository has a runner available, or add a copilot-code-review.yml file specifying one with the runs-on attribute. See the docs for more details.

Fixes a documented disposal contract gap in pooled collections where certain read accessors remained usable after Dispose, potentially exposing arrays already returned to ArrayPool.Shared (issue #296).

Changes:

  • Guarded Count on PooledCeleritySet and Count/Keys/Values on PooledCelerityDictionary with ThrowIfDisposed().
  • Extended existing “use-after-dispose” tests to assert ObjectDisposedException for those accessors (and added coverage for EnsureCapacity/TrimExcess on the dictionary).
  • Documented the fix in CHANGELOG.md under [Unreleased].

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated no comments.

Show a summary per file
File Description
src/Celerity/Collections/PooledCeleritySet.cs Ensures Count throws ObjectDisposedException after disposal via ThrowIfDisposed().
src/Celerity/Collections/PooledCelerityDictionary.cs Ensures Count, Keys, and Values throw ObjectDisposedException after disposal via ThrowIfDisposed().
src/Celerity.Tests/Collections/PooledCeleritySetTests.cs Adds regression assertion that Count throws after disposal.
src/Celerity.Tests/Collections/PooledCelerityDictionaryTests.cs Adds regression assertions for Count/Keys/Values and extends use-after-dispose coverage for EnsureCapacity/TrimExcess.
CHANGELOG.md Adds an [Unreleased] “Fixed” entry describing the disposal-contract fix and linking #296.

@github-actions

github-actions Bot commented Jul 23, 2026

Copy link
Copy Markdown

Coverage

Metric Value
Line 98.58% (6796/6894)
Branch 97.05% (2859/2946)
Files below 100% line coverage
File Line Branch
src/Celerity/Collections/TopKEntry.cs 80% n/a
src/Celerity/Collections/XorFilter.cs 94.29% 90%
src/Celerity/Collections/EnumMap.cs 95.09% 92.19%
src/Celerity/Collections/IndexedPriorityQueue.cs 96.23% 90.91%
src/Celerity/Collections/CuckooFilter.cs 96.6% 89.42%

@github-actions

github-actions Bot commented Jul 23, 2026

Copy link
Copy Markdown

Benchmarks

6 regressions ⚠️ vs main, 4 improvements ✅ (rows past ±10% beyond noise).

Highlights

Benchmark This PR StdDev main Δ
EnumSetBenchmark.HashSet_Add 555.7 ns 7.5 ns 687.9 ns -19.2% ✅
DequeBenchmark.LinkedList_PushFront(ItemCount: 100000) 1.77 ms 20.49 μs 2.01 ms -11.8% ✅
EnumSetBenchmark.HashSet_Remove 3.69 μs 474.7 ns 3.07 μs +20.4% ⚠️
EnumSetBenchmark.HashSet_Union 401.5 ns 1.9 ns 475.4 ns -15.5% ✅
EnumSetBenchmark.EnumSet_Union 21.5 ns 0.1 ns 24.3 ns -11.6% ✅
SwissSetBenchmark.HashSet_Remove(ItemCount: 1000) 26.97 μs 2.42 μs 20.64 μs +30.7% ⚠️
SmallSetBenchmark.HashSet_Remove(ItemCount: 8) 649.0 ns 204.8 ns 394.2 ns +64.6% ⚠️
SmallDictionaryBenchmark.Dictionary_Remove(ItemCount: 64) 5.93 μs 785.3 ns 4.84 μs +22.6% ⚠️
PooledCeleritySetBenchmark.HashSet_Add(ItemCount: 1000) 11.08 μs 86.6 ns 9.66 μs +14.7% ⚠️
LongDictionaryBenchmark.Dictionary_Remove(ItemCount: 100000) 2.00 ms 366.54 μs 1.55 ms +29.0% ⚠️
Collections (396)
Benchmark This PR StdDev main Δ
HyperLogLogBenchmark.HashSet_Add(ItemCount: 1000) 12.47 μs 91.4 ns 12.55 μs -0.6%
HyperLogLogBenchmark.HyperLogLog_Add(ItemCount: 1000) 29.85 μs 110.3 ns 29.82 μs +0.1%
HyperLogLogBenchmark.HashSet_Add(ItemCount: 100000) 5.03 ms 68.42 μs 4.96 ms +1.3%
HyperLogLogBenchmark.HyperLogLog_Add(ItemCount: 100000) 496.95 μs 15.61 μs 503.73 μs -1.3%
HyperLogLogBenchmark.HashSet_Estimate(ItemCount: 1000) 0.0 ns 0.0 ns 0.0 ns -82.4%
HyperLogLogBenchmark.HyperLogLog_Estimate(ItemCount: 1000) 26.42 μs 246.4 ns 26.55 μs -0.5%
HyperLogLogBenchmark.HashSet_Estimate(ItemCount: 100000) 0.0 ns 0.0 ns 0.0 ns -17.6%
HyperLogLogBenchmark.HyperLogLog_Estimate(ItemCount: 100000) 27.86 μs 242.3 ns 27.85 μs +0.0%
EnumSetBenchmark.HashSet_Add 555.7 ns 7.5 ns 687.9 ns -19.2% ✅
EnumSetBenchmark.EnumSet_Add 86.3 ns 2.4 ns 87.0 ns -0.8%
LongSetBenchmark.HashSet_Add(ItemCount: 1000) 12.94 μs 154.2 ns 12.79 μs +1.2%
LongSetBenchmark.LongSet_Add(ItemCount: 1000) 9.39 μs 94.9 ns 9.01 μs +4.2%
LongSetBenchmark.HashSet_Add(ItemCount: 100000) 4.53 ms 232.70 μs 4.43 ms +2.2%
LongSetBenchmark.LongSet_Add(ItemCount: 100000) 6.09 ms 52.62 μs 6.03 ms +0.9%
EnumSetBenchmark.HashSet_Contains 175.4 ns 0.2 ns 175.3 ns +0.1%
EnumSetBenchmark.EnumSet_Contains 45.9 ns 0.1 ns 46.0 ns -0.2%
LongSetBenchmark.HashSet_Contains(ItemCount: 1000) 4.80 μs 58.4 ns 4.80 μs +0.0%
LongSetBenchmark.LongSet_Contains(ItemCount: 1000) 2.01 μs 9.1 ns 2.00 μs +0.3%
LongSetBenchmark.HashSet_Contains(ItemCount: 100000) 1.64 ms 10.46 μs 1.63 ms +0.1%
LongSetBenchmark.LongSet_Contains(ItemCount: 100000) 640.50 μs 1.61 μs 640.57 μs -0.0%
CelerityMultiSetBenchmark.Dictionary_Count(ItemCount: 1000) 9.99 μs 58.5 ns 9.97 μs +0.2%
CelerityMultiSetBenchmark.CelerityMultiSet_Count(ItemCount: 1000) 5.67 μs 182.3 ns 5.58 μs +1.6%
CelerityMultiSetBenchmark.Dictionary_Count(ItemCount: 100000) 1.46 ms 12.65 μs 1.45 ms +0.7%
CelerityMultiSetBenchmark.CelerityMultiSet_Count(ItemCount: 100000) 692.83 μs 3.87 μs 692.28 μs +0.1%
DequeBenchmark.LinkedList_Enumerate(ItemCount: 1000) 1.37 μs 1.1 ns 1.37 μs +0.1%
DequeBenchmark.Deque_Enumerate(ItemCount: 1000) 941.2 ns 0.6 ns 941.5 ns -0.0%
DequeBenchmark.LinkedList_Enumerate(ItemCount: 100000) 134.96 μs 99.8 ns 135.36 μs -0.3%
DequeBenchmark.Deque_Enumerate(ItemCount: 100000) 93.74 μs 70.9 ns 93.94 μs -0.2%
HashCachingDictionaryBenchmark.Dictionary_Insert(ItemCount: 1000) 13.52 μs 320.5 ns 12.82 μs +5.5%
HashCachingDictionaryBenchmark.HashCachingDictionary_Insert(ItemCount: 1000) 11.73 μs 266.8 ns 11.30 μs +3.8%
HashCachingDictionaryBenchmark.Dictionary_Insert(ItemCount: 100000) 4.70 ms 66.97 μs 4.65 ms +1.1%
HashCachingDictionaryBenchmark.HashCachingDictionary_Insert(ItemCount: 100000) 6.51 ms 271.18 μs 6.48 ms +0.4%
CelerityMultiSetBenchmark.Dictionary_Lookup(ItemCount: 1000) 4.68 μs 4.0 ns 4.68 μs -0.1%
HashCachingDictionaryBenchmark.Dictionary_Lookup(ItemCount: 1000) 4.69 μs 23.3 ns 4.72 μs -0.6%
CelerityMultiSetBenchmark.CelerityMultiSet_Lookup(ItemCount: 1000) 1.61 μs 11.1 ns 1.61 μs -0.1%
HashCachingDictionaryBenchmark.HashCachingDictionary_Lookup(ItemCount: 1000) 2.91 μs 245.7 ns 2.68 μs +8.9%
CelerityMultiSetBenchmark.Dictionary_Lookup(ItemCount: 100000) 637.18 μs 11.02 μs 643.78 μs -1.0%
HashCachingDictionaryBenchmark.Dictionary_Lookup(ItemCount: 100000) 1.63 ms 24.10 μs 1.60 ms +1.9%
CelerityMultiSetBenchmark.CelerityMultiSet_Lookup(ItemCount: 100000) 206.06 μs 14.73 μs 191.27 μs +7.7%
HashCachingDictionaryBenchmark.HashCachingDictionary_Lookup(ItemCount: 100000) 816.45 μs 2.75 μs 810.84 μs +0.7%
DequeBenchmark.LinkedList_PushFront(ItemCount: 1000) 35.46 μs 1.47 μs 42.22 μs -16.0%
DequeBenchmark.Deque_PushFront(ItemCount: 1000) 18.94 μs 983.4 ns 19.54 μs -3.1%
DequeBenchmark.LinkedList_PushFront(ItemCount: 100000) 1.77 ms 20.49 μs 2.01 ms -11.8% ✅
DequeBenchmark.Deque_PushFront(ItemCount: 100000) 639.06 μs 40.54 μs 712.26 μs -10.3%
DequeBenchmark.LinkedList_Queue(ItemCount: 1000) 61.24 μs 4.63 μs 58.99 μs +3.8%
DequeBenchmark.Deque_Queue(ItemCount: 1000) 37.05 μs 3.00 μs 37.34 μs -0.8%
DequeBenchmark.LinkedList_Queue(ItemCount: 100000) 4.18 ms 53.09 μs 4.42 ms -5.5%
DequeBenchmark.Deque_Queue(ItemCount: 100000) 502.07 μs 128.71 μs 491.29 μs +2.2%
EnumSetBenchmark.HashSet_Remove 3.69 μs 474.7 ns 3.07 μs +20.4% ⚠️
EnumSetBenchmark.EnumSet_Remove 1.17 μs 223.4 ns 1.06 μs +10.0%
CelerityMultiSetBenchmark.Dictionary_Remove(ItemCount: 1000) 54.48 μs 5.52 μs 54.76 μs -0.5%
HashCachingDictionaryBenchmark.Dictionary_Remove(ItemCount: 1000) 86.85 μs 5.64 μs 81.24 μs +6.9%
LongSetBenchmark.HashSet_Remove(ItemCount: 1000) 84.19 μs 7.04 μs 78.49 μs +7.3%
CelerityMultiSetBenchmark.CelerityMultiSet_Remove(ItemCount: 1000) 96.03 μs 4.86 μs 101.92 μs -5.8%
HashCachingDictionaryBenchmark.HashCachingDictionary_Remove(ItemCount: 1000) 112.90 μs 7.25 μs 122.41 μs -7.8%
LongSetBenchmark.LongSet_Remove(ItemCount: 1000) 82.76 μs 8.24 μs 85.78 μs -3.5%
CelerityMultiSetBenchmark.Dictionary_Remove(ItemCount: 100000) 537.93 μs 12.05 μs 553.23 μs -2.8%
HashCachingDictionaryBenchmark.Dictionary_Remove(ItemCount: 100000) 2.03 ms 49.73 μs 2.04 ms -0.5%
LongSetBenchmark.HashSet_Remove(ItemCount: 100000) 1.99 ms 31.58 μs 1.98 ms +0.4%
CelerityMultiSetBenchmark.CelerityMultiSet_Remove(ItemCount: 100000) 1.49 ms 12.70 μs 1.48 ms +0.8%
HashCachingDictionaryBenchmark.HashCachingDictionary_Remove(ItemCount: 100000) 1.80 ms 67.63 μs 1.76 ms +1.9%
LongSetBenchmark.LongSet_Remove(ItemCount: 100000) 1.43 ms 19.33 μs 1.42 ms +0.9%
EnumSetBenchmark.HashSet_Union 401.5 ns 1.9 ns 475.4 ns -15.5% ✅
EnumSetBenchmark.EnumSet_Union 21.5 ns 0.1 ns 24.3 ns -11.6% ✅
EnumMapBenchmark.Dictionary_Add 473.7 ns 3.6 ns 477.5 ns -0.8%
EnumMapBenchmark.EnumMap_Add 85.0 ns 0.2 ns 86.0 ns -1.1%
CountMinSketchBenchmark.Dictionary_Add(ItemCount: 1000) 8.07 μs 20.8 ns 8.09 μs -0.2%
IntSetBenchmark.HashSet_Add(ItemCount: 1000) 9.89 μs 145.6 ns 9.93 μs -0.4%
SwissSetBenchmark.HashSet_Add(ItemCount: 1000) 9.85 μs 98.1 ns 9.97 μs -1.2%
CountMinSketchBenchmark.CountMinSketch_Add(ItemCount: 1000) 10.05 μs 68.9 ns 10.07 μs -0.2%
IntSetBenchmark.IntSet_Add(ItemCount: 1000) 7.13 μs 48.7 ns 7.08 μs +0.7%
SwissSetBenchmark.SwissSet_Add(ItemCount: 1000) 20.11 μs 68.8 ns 20.09 μs +0.1%
CountMinSketchBenchmark.Dictionary_Add(ItemCount: 100000) 1.13 ms 10.37 μs 1.12 ms +0.5%
IntSetBenchmark.HashSet_Add(ItemCount: 100000) 4.28 ms 95.60 μs 4.28 ms +0.0%
SwissSetBenchmark.HashSet_Add(ItemCount: 100000) 4.07 ms 54.38 μs 4.07 ms +0.0%
CountMinSketchBenchmark.CountMinSketch_Add(ItemCount: 100000) 885.19 μs 3.12 μs 890.60 μs -0.6%
IntSetBenchmark.IntSet_Add(ItemCount: 100000) 2.69 ms 17.01 μs 2.69 ms -0.0%
SwissSetBenchmark.SwissSet_Add(ItemCount: 100000) 3.62 ms 104.63 μs 3.65 ms -0.9%
BitSetBenchmark.BitArray_And(ItemCount: 1024) 68.7 ns 2.7 ns 71.3 ns -3.7%
BitSetBenchmark.BitSet_And(ItemCount: 1024) 954.5 ns 2.4 ns 953.4 ns +0.1%
BitSetBenchmark.BitArray_And(ItemCount: 1000000) 35.81 μs 271.5 ns 36.02 μs -0.6%
BitSetBenchmark.BitSet_And(ItemCount: 1000000) 3.91 ms 5.88 μs 3.91 ms +0.0%
IntSetBenchmark.HashSet_Contains(ItemCount: 1000) 3.65 μs 4.0 ns 3.65 μs +0.0%
SwissSetBenchmark.HashSet_Contains(ItemCount: 1000) 3.68 μs 3.3 ns 3.69 μs -0.3%
IntSetBenchmark.IntSet_Contains(ItemCount: 1000) 1.49 μs 20.4 ns 1.50 μs -0.6%
SwissSetBenchmark.SwissSet_Contains(ItemCount: 1000) 2.12 μs 6.0 ns 2.12 μs +0.0%
IntSetBenchmark.HashSet_Contains(ItemCount: 100000) 1.18 ms 7.95 μs 1.18 ms +0.1%
SwissSetBenchmark.HashSet_Contains(ItemCount: 100000) 1.18 ms 2.11 μs 1.18 ms +0.2%
IntSetBenchmark.IntSet_Contains(ItemCount: 100000) 384.54 μs 8.99 μs 377.02 μs +2.0%
SwissSetBenchmark.SwissSet_Contains(ItemCount: 100000) 345.29 μs 20.02 μs 347.55 μs -0.6%
SwissSetBenchmark.HashSet_ContainsMissing(ItemCount: 1000) 3.54 μs 2.8 ns 3.54 μs +0.1%
SwissSetBenchmark.SwissSet_ContainsMissing(ItemCount: 1000) 1.95 μs 2.1 ns 1.95 μs +0.1%
SwissSetBenchmark.HashSet_ContainsMissing(ItemCount: 100000) 1.55 ms 5.82 μs 1.55 ms +0.1%
SwissSetBenchmark.SwissSet_ContainsMissing(ItemCount: 100000) 247.01 μs 729.4 ns 247.20 μs -0.1%
EnumMapBenchmark.Dictionary_Enumerate 33.4 ns 0.0 ns 33.4 ns +0.1%
EnumMapBenchmark.EnumMap_Enumerate 29.5 ns 0.2 ns 29.4 ns +0.2%
CountMinSketchBenchmark.Dictionary_Estimate(ItemCount: 1000) 3.60 μs 1.5 ns 3.65 μs -1.3%
CountMinSketchBenchmark.CountMinSketch_Estimate(ItemCount: 1000) 6.31 μs 14.1 ns 6.31 μs +0.0%
CountMinSketchBenchmark.Dictionary_Estimate(ItemCount: 100000) 412.54 μs 720.1 ns 411.86 μs +0.2%
CountMinSketchBenchmark.CountMinSketch_Estimate(ItemCount: 100000) 1.77 ms 46.14 μs 1.72 ms +2.8%
LruCacheBenchmark.Dictionary_Get(ItemCount: 1000) 19.34 μs 392.7 ns 18.96 μs +2.0%
LruCacheBenchmark.LruCache_Get(ItemCount: 1000) 5.76 μs 41.4 ns 5.66 μs +1.8%
LruCacheBenchmark.Dictionary_Get(ItemCount: 100000) 20.78 μs 920.3 ns 19.25 μs +8.0%
LruCacheBenchmark.LruCache_Get(ItemCount: 100000) 6.01 μs 185.6 ns 5.82 μs +3.2%
LruCacheBenchmark.Dictionary_GetMissing(ItemCount: 1000) 3.56 μs 3.2 ns 3.56 μs -0.0%
LruCacheBenchmark.LruCache_GetMissing(ItemCount: 1000) 2.87 μs 2.5 ns 2.87 μs -0.0%
LruCacheBenchmark.Dictionary_GetMissing(ItemCount: 100000) 419.59 μs 2.43 μs 418.56 μs +0.2%
LruCacheBenchmark.LruCache_GetMissing(ItemCount: 100000) 1.18 ms 922.9 ns 1.17 ms +0.1%
CelerityMultiMapBenchmark.Dictionary_Insert(ItemCount: 1000) 21.06 μs 262.7 ns 21.14 μs -0.4%
CelerityMultiMapBenchmark.CelerityMultiMap_Insert(ItemCount: 1000) 29.73 μs 252.2 ns 30.35 μs -2.0%
CelerityMultiMapBenchmark.Dictionary_Insert(ItemCount: 100000) 10.24 ms 475.73 μs 10.34 ms -1.0%
CelerityMultiMapBenchmark.CelerityMultiMap_Insert(ItemCount: 100000) 14.93 ms 142.29 μs 14.97 ms -0.3%
EnumMapBenchmark.Dictionary_Lookup 105.1 ns 0.1 ns 105.3 ns -0.2%
EnumMapBenchmark.EnumMap_Lookup 54.6 ns 0.0 ns 54.2 ns +0.8%
CelerityMultiMapBenchmark.Dictionary_Lookup(ItemCount: 1000) 3.96 μs 3.8 ns 4.63 μs -14.6%
CelerityMultiMapBenchmark.CelerityMultiMap_Lookup(ItemCount: 1000) 1.90 μs 2.4 ns 1.90 μs +0.1%
CelerityMultiMapBenchmark.Dictionary_Lookup(ItemCount: 100000) 1.39 ms 3.42 μs 1.40 ms -0.4%
CelerityMultiMapBenchmark.CelerityMultiMap_Lookup(ItemCount: 100000) 554.21 μs 13.33 μs 533.96 μs +3.8%
BitSetBenchmark.BitArray_Or(ItemCount: 1024) 72.0 ns 1.5 ns 69.5 ns +3.6%
BitSetBenchmark.BitSet_Or(ItemCount: 1024) 955.3 ns 2.6 ns 953.3 ns +0.2%
BitSetBenchmark.BitArray_Or(ItemCount: 1000000) 35.91 μs 285.9 ns 35.84 μs +0.2%
BitSetBenchmark.BitSet_Or(ItemCount: 1000000) 3.91 ms 10.78 μs 3.91 ms -0.0%
BitSetBenchmark.BitArray_PopCount(ItemCount: 1024) 978.6 ns 52.5 ns 994.4 ns -1.6%
BitSetBenchmark.BitSet_PopCount(ItemCount: 1024) 5.4 ns 0.0 ns 5.4 ns +0.5%
BitSetBenchmark.BitArray_PopCount(ItemCount: 1000000) 4.25 ms 2.13 μs 4.25 ms -0.0%
BitSetBenchmark.BitSet_PopCount(ItemCount: 1000000) 4.30 μs 2.1 ns 4.30 μs -0.0%
LruCacheBenchmark.Dictionary_Put(ItemCount: 1000) 69.15 μs 1.45 μs 72.92 μs -5.2%
LruCacheBenchmark.LruCache_Put(ItemCount: 1000) 366.49 μs 13.82 μs 369.43 μs -0.8%
LruCacheBenchmark.Dictionary_Put(ItemCount: 100000) 5.92 ms 33.81 μs 5.98 ms -1.1%
LruCacheBenchmark.LruCache_Put(ItemCount: 100000) 4.95 ms 11.19 μs 4.97 ms -0.6%
EnumMapBenchmark.Dictionary_Remove 2.44 μs 463.2 ns 1.93 μs +26.3%
EnumMapBenchmark.EnumMap_Remove 1.24 μs 336.8 ns 1.05 μs +18.9%
CelerityMultiMapBenchmark.Dictionary_Remove(ItemCount: 1000) 25.58 μs 1.84 μs 24.52 μs +4.4%
IntSetBenchmark.HashSet_Remove(ItemCount: 1000) 23.01 μs 2.88 μs 20.23 μs +13.7%
CelerityMultiMapBenchmark.CelerityMultiMap_Remove(ItemCount: 1000) 112.87 μs 7.14 μs 116.77 μs -3.3%
IntSetBenchmark.IntSet_Remove(ItemCount: 1000) 63.99 μs 5.55 μs 62.60 μs +2.2%
SwissSetBenchmark.HashSet_Remove(ItemCount: 1000) 26.97 μs 2.42 μs 20.64 μs +30.7% ⚠️
SwissSetBenchmark.SwissSet_Remove(ItemCount: 1000) 50.90 μs 2.45 μs 51.84 μs -1.8%
CelerityMultiMapBenchmark.Dictionary_Remove(ItemCount: 100000) 1.77 ms 299.96 μs 1.73 ms +2.0%
IntSetBenchmark.HashSet_Remove(ItemCount: 100000) 1.30 ms 12.44 μs 1.31 ms -0.8%
CelerityMultiMapBenchmark.CelerityMultiMap_Remove(ItemCount: 100000) 1.70 ms 136.29 μs 1.71 ms -0.4%
IntSetBenchmark.IntSet_Remove(ItemCount: 100000) 1.12 ms 10.62 μs 1.12 ms -0.3%
SwissSetBenchmark.HashSet_Remove(ItemCount: 100000) 1.34 ms 8.43 μs 1.33 ms +0.5%
SwissSetBenchmark.SwissSet_Remove(ItemCount: 100000) 676.50 μs 15.57 μs 666.30 μs +1.5%
BitSetBenchmark.BitArray_Xor(ItemCount: 1024) 71.2 ns 3.6 ns 72.2 ns -1.3%
BitSetBenchmark.BitSet_Xor(ItemCount: 1024) 953.3 ns 2.3 ns 953.6 ns -0.0%
BitSetBenchmark.BitArray_Xor(ItemCount: 1000000) 35.89 μs 271.0 ns 35.88 μs +0.0%
BitSetBenchmark.BitSet_Xor(ItemCount: 1000000) 3.90 ms 7.07 μs 3.90 ms -0.0%
SmallSetBenchmark.HashSet_Add(ItemCount: 8) 158.0 ns 0.9 ns 157.2 ns +0.5%
SmallSetBenchmark.SmallSet_Add(ItemCount: 8) 44.0 ns 0.3 ns 46.6 ns -5.6%
SmallSetBenchmark.HashSet_Add(ItemCount: 64) 715.7 ns 4.1 ns 853.0 ns -16.1%
SmallSetBenchmark.SmallSet_Add(ItemCount: 64) 1.64 μs 8.2 ns 1.64 μs +0.1%
RobinHoodSetBenchmark.HashSet_Add(ItemCount: 1000) 11.69 μs 48.9 ns 11.80 μs -0.9%
TopKSketchBenchmark.Dictionary_Add(ItemCount: 1000) 12.73 μs 16.8 ns 12.58 μs +1.2%
RobinHoodSetBenchmark.RobinHoodSet_Add(ItemCount: 1000) 16.69 μs 150.0 ns 16.75 μs -0.4%
TopKSketchBenchmark.TopKSketch_Add(ItemCount: 1000) 82.00 μs 472.4 ns 82.51 μs -0.6%
RobinHoodSetBenchmark.HashSet_Add(ItemCount: 100000) 4.69 ms 274.91 μs 4.64 ms +1.1%
TopKSketchBenchmark.Dictionary_Add(ItemCount: 100000) 3.28 ms 106.04 μs 3.21 ms +2.2%
RobinHoodSetBenchmark.RobinHoodSet_Add(ItemCount: 100000) 6.17 ms 74.10 μs 6.16 ms +0.1%
TopKSketchBenchmark.TopKSketch_Add(ItemCount: 100000) 13.77 ms 13.68 μs 13.79 ms -0.1%
DisjointSetBenchmark.Dictionary_Components(ItemCount: 1000) 18.15 μs 132.9 ns 18.05 μs +0.6%
DisjointSetBenchmark.DisjointSet_Components(ItemCount: 1000) 16.07 μs 61.5 ns 16.06 μs +0.1%
DisjointSetBenchmark.Dictionary_Components(ItemCount: 100000) 4.20 ms 61.58 μs 4.23 ms -0.7%
DisjointSetBenchmark.DisjointSet_Components(ItemCount: 100000) 3.26 ms 76.42 μs 3.31 ms -1.3%
DisjointSetBenchmark.Dictionary_Connected(ItemCount: 1000) 9.40 μs 253.6 ns 9.19 μs +2.2%
DisjointSetBenchmark.DisjointSet_Connected(ItemCount: 1000) 12.14 μs 55.2 ns 12.44 μs -2.4%
DisjointSetBenchmark.Dictionary_Connected(ItemCount: 100000) 252.52 μs 276.6 ns 257.59 μs -2.0%
DisjointSetBenchmark.DisjointSet_Connected(ItemCount: 100000) 337.20 μs 1.06 μs 335.66 μs +0.5%
SmallSetBenchmark.HashSet_Contains(ItemCount: 8) 37.5 ns 0.3 ns 37.2 ns +0.8%
SmallSetBenchmark.SmallSet_Contains(ItemCount: 8) 19.2 ns 0.1 ns 19.1 ns +0.7%
SmallSetBenchmark.HashSet_Contains(ItemCount: 64) 299.4 ns 0.3 ns 298.9 ns +0.2%
SmallSetBenchmark.SmallSet_Contains(ItemCount: 64) 1.11 μs 14.9 ns 1.09 μs +2.4%
RobinHoodSetBenchmark.HashSet_Contains(ItemCount: 1000) 4.76 μs 44.9 ns 4.74 μs +0.4%
RobinHoodSetBenchmark.RobinHoodSet_Contains(ItemCount: 1000) 2.42 μs 2.3 ns 2.44 μs -0.7%
RobinHoodSetBenchmark.HashSet_Contains(ItemCount: 100000) 1.51 ms 47.39 μs 1.57 ms -3.6%
RobinHoodSetBenchmark.RobinHoodSet_Contains(ItemCount: 100000) 731.26 μs 2.34 μs 731.11 μs +0.0%
RobinHoodSetBenchmark.HashSet_ContainsMissing(ItemCount: 1000) 4.54 μs 7.9 ns 4.54 μs +0.1%
RobinHoodSetBenchmark.RobinHoodSet_ContainsMissing(ItemCount: 1000) 2.72 μs 2.5 ns 2.72 μs +0.0%
RobinHoodSetBenchmark.HashSet_ContainsMissing(ItemCount: 100000) 1.90 ms 23.49 μs 1.92 ms -1.1%
RobinHoodSetBenchmark.RobinHoodSet_ContainsMissing(ItemCount: 100000) 1.17 ms 1.16 μs 1.17 ms +0.0%
SmallDictionaryBenchmark.Dictionary_Insert(ItemCount: 8) 159.1 ns 2.9 ns 156.2 ns +1.9%
SmallDictionaryBenchmark.SmallDictionary_Insert(ItemCount: 8) 83.2 ns 0.3 ns 83.6 ns -0.4%
SmallDictionaryBenchmark.Dictionary_Insert(ItemCount: 64) 750.8 ns 7.6 ns 751.5 ns -0.1%
SmallDictionaryBenchmark.SmallDictionary_Insert(ItemCount: 64) 1.05 μs 7.7 ns 1.06 μs -0.5%
CelerityDictionaryBenchmark.Dictionary_Insert(ItemCount: 1000) 12.86 μs 234.1 ns 12.56 μs +2.4%
PooledCelerityDictionaryBenchmark.Dictionary_Insert(ItemCount: 1000) 12.58 μs 126.9 ns 12.83 μs -1.9%
CelerityDictionaryBenchmark.CelerityDictionary_Insert(ItemCount: 1000) 11.49 μs 21.4 ns 11.28 μs +1.9%
PooledCelerityDictionaryBenchmark.PooledCelerityDictionary_Insert(ItemCount: 1000) 8.05 μs 20.1 ns 8.35 μs -3.6%
CelerityDictionaryBenchmark.Dictionary_Insert(ItemCount: 100000) 4.06 ms 70.04 μs 4.04 ms +0.4%
PooledCelerityDictionaryBenchmark.Dictionary_Insert(ItemCount: 100000) 4.92 ms 61.41 μs 4.89 ms +0.6%
CelerityDictionaryBenchmark.CelerityDictionary_Insert(ItemCount: 100000) 4.76 ms 37.74 μs 4.70 ms +1.3%
PooledCelerityDictionaryBenchmark.PooledCelerityDictionary_Insert(ItemCount: 100000) 2.97 ms 3.52 μs 2.93 ms +1.4%
SmallDictionaryBenchmark.Dictionary_Lookup(ItemCount: 8) 36.9 ns 0.2 ns 37.0 ns -0.3%
SmallDictionaryBenchmark.SmallDictionary_Lookup(ItemCount: 8) 25.8 ns 4.0 ns 27.6 ns -6.5%
SmallDictionaryBenchmark.Dictionary_Lookup(ItemCount: 64) 296.6 ns 1.3 ns 296.8 ns -0.1%
SmallDictionaryBenchmark.SmallDictionary_Lookup(ItemCount: 64) 1.11 μs 9.6 ns 1.10 μs +1.3%
CelerityDictionaryBenchmark.Dictionary_Lookup(ItemCount: 1000) 4.76 μs 19.2 ns 4.76 μs -0.1%
PooledCelerityDictionaryBenchmark.Dictionary_Lookup(ItemCount: 1000) 4.73 μs 29.8 ns 4.72 μs +0.1%
CelerityDictionaryBenchmark.CelerityDictionary_Lookup(ItemCount: 1000) 2.21 μs 75.1 ns 2.16 μs +2.5%
PooledCelerityDictionaryBenchmark.PooledCelerityDictionary_Lookup(ItemCount: 1000) 2.38 μs 18.1 ns 2.37 μs +0.1%
CelerityDictionaryBenchmark.Dictionary_Lookup(ItemCount: 100000) 1.58 ms 3.84 μs 1.58 ms +0.0%
PooledCelerityDictionaryBenchmark.Dictionary_Lookup(ItemCount: 100000) 1.61 ms 14.62 μs 1.59 ms +0.7%
CelerityDictionaryBenchmark.CelerityDictionary_Lookup(ItemCount: 100000) 718.31 μs 34.09 μs 685.28 μs +4.8%
PooledCelerityDictionaryBenchmark.PooledCelerityDictionary_Lookup(ItemCount: 100000) 690.91 μs 3.51 μs 694.14 μs -0.5%
SmallDictionaryBenchmark.Dictionary_Remove(ItemCount: 8) 1.48 μs 249.2 ns 1.60 μs -7.3%
SmallSetBenchmark.HashSet_Remove(ItemCount: 8) 649.0 ns 204.8 ns 394.2 ns +64.6% ⚠️
SmallDictionaryBenchmark.SmallDictionary_Remove(ItemCount: 8) 1.30 μs 61.9 ns 1.44 μs -9.6%
SmallSetBenchmark.SmallSet_Remove(ItemCount: 8) 1.01 μs 155.7 ns 943.8 ns +7.0%
SmallDictionaryBenchmark.Dictionary_Remove(ItemCount: 64) 5.93 μs 785.3 ns 4.84 μs +22.6% ⚠️
SmallSetBenchmark.HashSet_Remove(ItemCount: 64) 1.26 μs 51.6 ns 1.33 μs -5.4%
SmallDictionaryBenchmark.SmallDictionary_Remove(ItemCount: 64) 26.80 μs 4.68 μs 21.75 μs +23.2%
SmallSetBenchmark.SmallSet_Remove(ItemCount: 64) 26.94 μs 4.11 μs 23.55 μs +14.4%
CelerityDictionaryBenchmark.Dictionary_Remove(ItemCount: 1000) 80.42 μs 6.57 μs 87.09 μs -7.7%
PooledCelerityDictionaryBenchmark.Dictionary_Remove(ItemCount: 1000) 82.94 μs 6.53 μs 80.62 μs +2.9%
CelerityDictionaryBenchmark.CelerityDictionary_Remove(ItemCount: 1000) 144.12 μs 3.99 μs 142.37 μs +1.2%
PooledCelerityDictionaryBenchmark.PooledCelerityDictionary_Remove(ItemCount: 1000) 148.59 μs 10.52 μs 145.63 μs +2.0%
RobinHoodSetBenchmark.HashSet_Remove(ItemCount: 1000) 26.27 μs 1.29 μs 30.38 μs -13.5%
RobinHoodSetBenchmark.RobinHoodSet_Remove(ItemCount: 1000) 131.20 μs 8.80 μs 126.21 μs +4.0%
CelerityDictionaryBenchmark.Dictionary_Remove(ItemCount: 100000) 2.04 ms 10.98 μs 2.07 ms -1.6%
PooledCelerityDictionaryBenchmark.Dictionary_Remove(ItemCount: 100000) 2.03 ms 7.29 μs 2.03 ms +0.1%
CelerityDictionaryBenchmark.CelerityDictionary_Remove(ItemCount: 100000) 1.54 ms 21.64 μs 1.55 ms -0.4%
PooledCelerityDictionaryBenchmark.PooledCelerityDictionary_Remove(ItemCount: 100000) 1.57 ms 51.28 μs 1.55 ms +1.2%
RobinHoodSetBenchmark.HashSet_Remove(ItemCount: 100000) 1.70 ms 12.66 μs 1.70 ms -0.1%
RobinHoodSetBenchmark.RobinHoodSet_Remove(ItemCount: 100000) 1.34 ms 40.65 μs 1.35 ms -0.5%
TopKSketchBenchmark.Dictionary_TopK(ItemCount: 1000) 29.6 ns 0.1 ns 29.5 ns +0.3%
TopKSketchBenchmark.TopKSketch_TopK(ItemCount: 1000) 1.20 μs 3.5 ns 1.21 μs -0.4%
TopKSketchBenchmark.Dictionary_TopK(ItemCount: 100000) 30.0 ns 2.1 ns 29.6 ns +1.4%
TopKSketchBenchmark.TopKSketch_TopK(ItemCount: 100000) 1.19 μs 13.8 ns 1.17 μs +1.5%
DisjointSetBenchmark.Dictionary_Union(ItemCount: 1000) 93.27 μs 715.4 ns 92.96 μs +0.3%
DisjointSetBenchmark.DisjointSet_Union(ItemCount: 1000) 26.11 μs 137.1 ns 26.09 μs +0.1%
DisjointSetBenchmark.Dictionary_Union(ItemCount: 100000) 39.23 ms 359.05 μs 39.21 ms +0.0%
DisjointSetBenchmark.DisjointSet_Union(ItemCount: 100000) 8.05 ms 25.37 μs 8.04 ms +0.1%
TrieBenchmark.Dictionary_Add(ItemCount: 1000) 32.16 μs 1.36 μs 32.61 μs -1.4%
TrieBenchmark.Trie_Add(ItemCount: 1000) 540.72 μs 25.91 μs 540.37 μs +0.1%
BloomFilterBenchmark.HashSet_Add(ItemCount: 1000) 11.94 μs 192.9 ns 11.90 μs +0.4%
CeleritySetBenchmark.HashSet_Add(ItemCount: 1000) 11.98 μs 269.4 ns 12.24 μs -2.1%
HashCachingSetBenchmark.HashSet_Add(ItemCount: 1000) 11.86 μs 81.3 ns 11.73 μs +1.1%
BloomFilterBenchmark.BloomFilter_Add(ItemCount: 1000) 14.42 μs 26.1 ns 14.40 μs +0.1%
CeleritySetBenchmark.CeleritySet_Add(ItemCount: 1000) 8.71 μs 31.9 ns 8.68 μs +0.4%
HashCachingSetBenchmark.HashCachingSet_Add(ItemCount: 1000) 11.05 μs 33.2 ns 11.07 μs -0.2%
TrieBenchmark.Dictionary_Add(ItemCount: 100000) 4.79 ms 1.69 ms 4.83 ms -0.9%
TrieBenchmark.Trie_Add(ItemCount: 100000) 25.27 ms 339.74 μs 24.94 ms +1.3%
BloomFilterBenchmark.HashSet_Add(ItemCount: 100000) 4.66 ms 119.92 μs 4.67 ms -0.3%
CeleritySetBenchmark.HashSet_Add(ItemCount: 100000) 5.02 ms 108.00 μs 5.12 ms -2.0%
HashCachingSetBenchmark.HashSet_Add(ItemCount: 100000) 4.82 ms 224.79 μs 4.79 ms +0.6%
BloomFilterBenchmark.BloomFilter_Add(ItemCount: 100000) 1.09 ms 1.75 μs 1.10 ms -0.4%
CeleritySetBenchmark.CeleritySet_Add(ItemCount: 100000) 3.17 ms 21.78 μs 3.15 ms +0.5%
HashCachingSetBenchmark.HashCachingSet_Add(ItemCount: 100000) 5.18 ms 63.26 μs 5.16 ms +0.5%
BloomFilterBenchmark.HashSet_Contains(ItemCount: 1000) 4.74 μs 14.3 ns 4.73 μs +0.2%
CeleritySetBenchmark.HashSet_Contains(ItemCount: 1000) 4.74 μs 5.8 ns 4.75 μs -0.3%
HashCachingSetBenchmark.HashSet_Contains(ItemCount: 1000) 4.75 μs 23.3 ns 4.72 μs +0.5%
BloomFilterBenchmark.BloomFilter_Contains(ItemCount: 1000) 13.12 μs 8.0 ns 13.12 μs -0.0%
CeleritySetBenchmark.CeleritySet_Contains(ItemCount: 1000) 1.83 μs 37.0 ns 1.87 μs -2.2%
HashCachingSetBenchmark.HashCachingSet_Contains(ItemCount: 1000) 2.43 μs 5.9 ns 2.42 μs +0.2%
BloomFilterBenchmark.HashSet_Contains(ItemCount: 100000) 1.58 ms 4.35 μs 1.56 ms +1.1%
CeleritySetBenchmark.HashSet_Contains(ItemCount: 100000) 1.56 ms 12.37 μs 1.57 ms -1.1%
HashCachingSetBenchmark.HashSet_Contains(ItemCount: 100000) 1.55 ms 3.06 μs 1.62 ms -4.1%
BloomFilterBenchmark.BloomFilter_Contains(ItemCount: 100000) 868.18 μs 756.3 ns 869.19 μs -0.1%
CeleritySetBenchmark.CeleritySet_Contains(ItemCount: 100000) 584.71 μs 551.7 ns 584.73 μs -0.0%
HashCachingSetBenchmark.HashCachingSet_Contains(ItemCount: 100000) 739.98 μs 5.68 μs 738.19 μs +0.2%
BloomFilterBenchmark.HashSet_ContainsMissing(ItemCount: 1000) 4.65 μs 107.3 ns 4.58 μs +1.6%
HashCachingSetBenchmark.HashSet_ContainsMissing(ItemCount: 1000) 4.54 μs 8.4 ns 4.57 μs -0.6%
BloomFilterBenchmark.BloomFilter_ContainsMissing(ItemCount: 1000) 3.54 μs 10.9 ns 3.53 μs +0.3%
HashCachingSetBenchmark.HashCachingSet_ContainsMissing(ItemCount: 1000) 2.80 μs 6.0 ns 2.94 μs -4.6%
BloomFilterBenchmark.HashSet_ContainsMissing(ItemCount: 100000) 1.92 ms 2.32 μs 1.93 ms -0.7%
HashCachingSetBenchmark.HashSet_ContainsMissing(ItemCount: 100000) 1.91 ms 22.73 μs 1.93 ms -0.7%
BloomFilterBenchmark.BloomFilter_ContainsMissing(ItemCount: 100000) 1.49 ms 664.6 ns 1.49 ms +0.0%
HashCachingSetBenchmark.HashCachingSet_ContainsMissing(ItemCount: 100000) 1.16 ms 1.62 μs 1.16 ms +0.2%
IndexedPriorityQueueBenchmark.PriorityQueue_DecreaseKey(ItemCount: 1000) 144.07 μs 1.37 μs 145.13 μs -0.7%
IndexedPriorityQueueBenchmark.IndexedPriorityQueue_DecreaseKey(ItemCount: 1000) 252.53 μs 1.75 μs 252.98 μs -0.2%
IndexedPriorityQueueBenchmark.PriorityQueue_DecreaseKey(ItemCount: 100000) 32.59 ms 173.41 μs 33.10 ms -1.5%
IndexedPriorityQueueBenchmark.IndexedPriorityQueue_DecreaseKey(ItemCount: 100000) 53.18 ms 150.47 μs 53.71 ms -1.0%
IndexedPriorityQueueBenchmark.PriorityQueue_Enqueue(ItemCount: 1000) 4.50 μs 34.8 ns 4.56 μs -1.3%
IndexedPriorityQueueBenchmark.IndexedPriorityQueue_Enqueue(ItemCount: 1000) 28.91 μs 91.7 ns 29.29 μs -1.3%
IndexedPriorityQueueBenchmark.PriorityQueue_Enqueue(ItemCount: 100000) 1.07 ms 13.49 μs 1.08 ms -0.7%
IndexedPriorityQueueBenchmark.IndexedPriorityQueue_Enqueue(ItemCount: 100000) 5.93 ms 161.56 μs 6.14 ms -3.3%
IntDictionaryBenchmark.Dictionary_Insert(ItemCount: 1000) 14.33 μs 1.23 μs 14.37 μs -0.3%
RobinHoodDictionaryBenchmark.Dictionary_Insert(ItemCount: 1000) 12.52 μs 33.4 ns 12.69 μs -1.4%
IntDictionaryBenchmark.IntDictionary_Insert(ItemCount: 1000) 10.99 μs 145.7 ns 10.91 μs +0.7%
RobinHoodDictionaryBenchmark.RobinHoodDictionary_Insert(ItemCount: 1000) 16.83 μs 102.6 ns 16.80 μs +0.2%
IntDictionaryBenchmark.Dictionary_Insert(ItemCount: 100000) 4.10 ms 82.96 μs 4.15 ms -1.4%
RobinHoodDictionaryBenchmark.Dictionary_Insert(ItemCount: 100000) 4.73 ms 77.31 μs 4.70 ms +0.8%
IntDictionaryBenchmark.IntDictionary_Insert(ItemCount: 100000) 4.83 ms 35.12 μs 4.87 ms -0.7%
RobinHoodDictionaryBenchmark.RobinHoodDictionary_Insert(ItemCount: 100000) 7.68 ms 568.80 μs 7.86 ms -2.3%
IntDictionaryBenchmark.Dictionary_Lookup(ItemCount: 1000) 4.83 μs 72.8 ns 4.77 μs +1.1%
RobinHoodDictionaryBenchmark.Dictionary_Lookup(ItemCount: 1000) 4.72 μs 15.9 ns 4.74 μs -0.3%
TrieBenchmark.Dictionary_Lookup(ItemCount: 1000) 13.35 μs 485.6 ns 13.08 μs +2.1%
IntDictionaryBenchmark.IntDictionary_Lookup(ItemCount: 1000) 2.14 μs 4.4 ns 2.15 μs -0.4%
RobinHoodDictionaryBenchmark.RobinHoodDictionary_Lookup(ItemCount: 1000) 2.65 μs 32.6 ns 2.63 μs +0.7%
TrieBenchmark.Trie_Lookup(ItemCount: 1000) 40.53 μs 314.2 ns 40.15 μs +0.9%
IntDictionaryBenchmark.Dictionary_Lookup(ItemCount: 100000) 1.59 ms 9.82 μs 1.60 ms -0.4%
RobinHoodDictionaryBenchmark.Dictionary_Lookup(ItemCount: 100000) 1.60 ms 4.38 μs 1.59 ms +0.3%
TrieBenchmark.Dictionary_Lookup(ItemCount: 100000) 2.67 ms 5.08 μs 2.76 ms -3.3%
IntDictionaryBenchmark.IntDictionary_Lookup(ItemCount: 100000) 673.86 μs 3.43 μs 687.05 μs -1.9%
RobinHoodDictionaryBenchmark.RobinHoodDictionary_Lookup(ItemCount: 100000) 829.50 μs 1.36 μs 824.99 μs +0.5%
TrieBenchmark.Trie_Lookup(ItemCount: 100000) 8.30 ms 20.86 μs 8.31 ms -0.0%
TrieBenchmark.Dictionary_PrefixMatch(ItemCount: 1000) 73.50 μs 119.0 ns 74.32 μs -1.1%
TrieBenchmark.Trie_PrefixMatch(ItemCount: 1000) 52.38 μs 214.6 ns 53.60 μs -2.3%
TrieBenchmark.Dictionary_PrefixMatch(ItemCount: 100000) 7.40 ms 16.28 μs 7.40 ms +0.0%
TrieBenchmark.Trie_PrefixMatch(ItemCount: 100000) 6.74 ms 9.71 μs 6.35 ms +6.0%
CeleritySetBenchmark.HashSet_Remove(ItemCount: 1000) 26.54 μs 1.23 μs 25.65 μs +3.5%
IntDictionaryBenchmark.Dictionary_Remove(ItemCount: 1000) 84.66 μs 8.23 μs 87.24 μs -3.0%
RobinHoodDictionaryBenchmark.Dictionary_Remove(ItemCount: 1000) 80.87 μs 5.99 μs 86.31 μs -6.3%
CeleritySetBenchmark.CeleritySet_Remove(ItemCount: 1000) 139.58 μs 9.47 μs 136.51 μs +2.2%
IntDictionaryBenchmark.IntDictionary_Remove(ItemCount: 1000) 89.72 μs 5.85 μs 92.59 μs -3.1%
RobinHoodDictionaryBenchmark.RobinHoodDictionary_Remove(ItemCount: 1000) 135.28 μs 9.87 μs 137.06 μs -1.3%
HashCachingSetBenchmark.HashSet_Remove(ItemCount: 1000) 33.42 μs 3.27 μs 28.15 μs +18.7%
HashCachingSetBenchmark.HashCachingSet_Remove(ItemCount: 1000) 114.01 μs 5.85 μs 115.53 μs -1.3%
CeleritySetBenchmark.HashSet_Remove(ItemCount: 100000) 1.71 ms 10.63 μs 1.71 ms +0.2%
IntDictionaryBenchmark.Dictionary_Remove(ItemCount: 100000) 2.05 ms 12.56 μs 2.04 ms +0.1%
RobinHoodDictionaryBenchmark.Dictionary_Remove(ItemCount: 100000) 2.03 ms 10.49 μs 2.04 ms -0.2%
CeleritySetBenchmark.CeleritySet_Remove(ItemCount: 100000) 1.31 ms 68.12 μs 1.31 ms -0.1%
IntDictionaryBenchmark.IntDictionary_Remove(ItemCount: 100000) 2.56 ms 2.01 ms 1.55 ms +65.3%
RobinHoodDictionaryBenchmark.RobinHoodDictionary_Remove(ItemCount: 100000) 1.65 ms 37.12 μs 1.64 ms +0.4%
HashCachingSetBenchmark.HashSet_Remove(ItemCount: 100000) 1.71 ms 10.92 μs 1.73 ms -1.3%
HashCachingSetBenchmark.HashCachingSet_Remove(ItemCount: 100000) 1.55 ms 14.88 μs 1.55 ms -0.4%
CuckooFilterBenchmark.HashSet_Add(ItemCount: 1000) 10.66 μs 275.9 ns 9.75 μs +9.3%
PooledCeleritySetBenchmark.HashSet_Add(ItemCount: 1000) 11.08 μs 86.6 ns 9.66 μs +14.7% ⚠️
CuckooFilterBenchmark.CuckooFilter_Add(ItemCount: 1000) 6.22 μs 10.9 ns 6.17 μs +0.8%
PooledCeleritySetBenchmark.PooledCeleritySet_Add(ItemCount: 1000) 7.48 μs 141.8 ns 7.56 μs -1.1%
CuckooFilterBenchmark.HashSet_Add(ItemCount: 100000) 3.92 ms 151.26 μs 3.86 ms +1.6%
PooledCeleritySetBenchmark.HashSet_Add(ItemCount: 100000) 4.11 ms 156.32 μs 4.14 ms -0.8%
CuckooFilterBenchmark.CuckooFilter_Add(ItemCount: 100000) 1.82 ms 7.88 μs 1.81 ms +0.6%
PooledCeleritySetBenchmark.PooledCeleritySet_Add(ItemCount: 100000) 2.46 ms 13.50 μs 2.46 ms -0.1%
FrozenCelerityDictionaryBenchmark.FrozenDictionary_Build(ItemCount: 1000) 130.19 μs 759.9 ns 131.19 μs -0.8%
FrozenCeleritySetBenchmark.FrozenSet_Build(ItemCount: 1000) 133.87 μs 667.3 ns 134.91 μs -0.8%
XorFilterBenchmark.HashSet_Build(ItemCount: 1000) 6.48 μs 45.3 ns 6.45 μs +0.5%
FrozenCelerityDictionaryBenchmark.FrozenCelerityDictionary_Build(ItemCount: 1000) 2.63 ms 56.58 μs 2.78 ms -5.5%
FrozenCeleritySetBenchmark.FrozenCeleritySet_Build(ItemCount: 1000) 1.77 ms 17.24 μs 1.85 ms -4.3%
XorFilterBenchmark.XorFilter_Build(ItemCount: 1000) 32.22 μs 429.7 ns 32.15 μs +0.2%
FrozenCelerityDictionaryBenchmark.FrozenDictionary_Build(ItemCount: 100000) 23.27 ms 189.16 μs 23.15 ms +0.5%
FrozenCeleritySetBenchmark.FrozenSet_Build(ItemCount: 100000) 22.85 ms 120.44 μs 23.28 ms -1.8%
XorFilterBenchmark.HashSet_Build(ItemCount: 100000) 1.61 ms 26.01 μs 1.61 ms -0.3%
FrozenCelerityDictionaryBenchmark.FrozenCelerityDictionary_Build(ItemCount: 100000) 1.51 s 160.37 ms 1.43 s +5.2%
FrozenCeleritySetBenchmark.FrozenCeleritySet_Build(ItemCount: 100000) 1.21 s 36.40 ms 1.19 s +2.1%
XorFilterBenchmark.XorFilter_Build(ItemCount: 100000) 11.11 ms 229.45 μs 11.13 ms -0.2%
CuckooFilterBenchmark.HashSet_Contains(ItemCount: 1000) 3.74 μs 56.1 ns 3.67 μs +1.8%
FrozenCeleritySetBenchmark.FrozenSet_Contains(ItemCount: 1000) 5.54 μs 9.5 ns 5.53 μs +0.2%
PooledCeleritySetBenchmark.HashSet_Contains(ItemCount: 1000) 3.66 μs 3.3 ns 3.65 μs +0.2%
XorFilterBenchmark.HashSet_Contains(ItemCount: 1000) 3.67 μs 2.8 ns 3.68 μs -0.2%
CuckooFilterBenchmark.CuckooFilter_Contains(ItemCount: 1000) 4.31 μs 4.3 ns 4.31 μs +0.1%
FrozenCeleritySetBenchmark.FrozenCeleritySet_Contains(ItemCount: 1000) 64.66 μs 23.4 ns 64.70 μs -0.1%
PooledCeleritySetBenchmark.PooledCeleritySet_Contains(ItemCount: 1000) 1.51 μs 19.6 ns 1.51 μs +0.1%
XorFilterBenchmark.XorFilter_Contains(ItemCount: 1000) 5.85 μs 2.9 ns 5.85 μs +0.0%
CuckooFilterBenchmark.HashSet_Contains(ItemCount: 100000) 1.20 ms 24.17 μs 1.18 ms +1.6%
FrozenCeleritySetBenchmark.FrozenSet_Contains(ItemCount: 100000) 1.45 ms 3.43 μs 1.46 ms -0.1%
PooledCeleritySetBenchmark.HashSet_Contains(ItemCount: 100000) 1.17 ms 1.46 μs 1.17 ms +0.0%
XorFilterBenchmark.HashSet_Contains(ItemCount: 100000) 1.17 ms 1.79 μs 1.18 ms -0.1%
CuckooFilterBenchmark.CuckooFilter_Contains(ItemCount: 100000) 1.53 ms 3.87 μs 1.53 ms +0.1%
FrozenCeleritySetBenchmark.FrozenCeleritySet_Contains(ItemCount: 100000) 6.30 ms 110.60 μs 6.49 ms -2.9%
PooledCeleritySetBenchmark.PooledCeleritySet_Contains(ItemCount: 100000) 382.27 μs 22.24 μs 376.20 μs +1.6%
XorFilterBenchmark.XorFilter_Contains(ItemCount: 100000) 621.94 μs 217.8 ns 622.05 μs -0.0%
CuckooFilterBenchmark.HashSet_ContainsMissing(ItemCount: 1000) 3.54 μs 2.5 ns 3.54 μs -0.1%
XorFilterBenchmark.HashSet_ContainsMissing(ItemCount: 1000) 3.54 μs 3.4 ns 3.54 μs +0.1%
CuckooFilterBenchmark.CuckooFilter_ContainsMissing(ItemCount: 1000) 7.46 μs 13.3 ns 7.45 μs +0.1%
XorFilterBenchmark.XorFilter_ContainsMissing(ItemCount: 1000) 5.84 μs 3.3 ns 5.85 μs -0.2%
CuckooFilterBenchmark.HashSet_ContainsMissing(ItemCount: 100000) 1.53 ms 7.66 μs 1.53 ms -0.1%
XorFilterBenchmark.HashSet_ContainsMissing(ItemCount: 100000) 1.54 ms 13.67 μs 1.56 ms -1.4%
CuckooFilterBenchmark.CuckooFilter_ContainsMissing(ItemCount: 100000) 764.95 μs 508.8 ns 764.71 μs +0.0%
XorFilterBenchmark.XorFilter_ContainsMissing(ItemCount: 100000) 624.27 μs 219.7 ns 624.94 μs -0.1%
LongDictionaryBenchmark.Dictionary_Insert(ItemCount: 1000) 12.21 μs 159.7 ns 11.67 μs +4.6%
SwissDictionaryBenchmark.Dictionary_Insert(ItemCount: 1000) 10.75 μs 116.2 ns 10.63 μs +1.2%
LongDictionaryBenchmark.LongDictionary_Insert(ItemCount: 1000) 7.09 μs 141.6 ns 6.95 μs +2.0%
SwissDictionaryBenchmark.SwissDictionary_Insert(ItemCount: 1000) 23.61 μs 128.2 ns 23.57 μs +0.1%
LongDictionaryBenchmark.Dictionary_Insert(ItemCount: 100000) 4.20 ms 39.74 μs 4.24 ms -1.2%
SwissDictionaryBenchmark.Dictionary_Insert(ItemCount: 100000) 4.02 ms 149.64 μs 4.02 ms +0.1%
LongDictionaryBenchmark.LongDictionary_Insert(ItemCount: 100000) 6.26 ms 98.46 μs 6.19 ms +1.1%
SwissDictionaryBenchmark.SwissDictionary_Insert(ItemCount: 100000) 3.00 ms 13.63 μs 3.04 ms -1.4%
FrozenCelerityDictionaryBenchmark.FrozenDictionary_Lookup(ItemCount: 1000) 5.92 μs 9.4 ns 5.91 μs +0.1%
LongDictionaryBenchmark.Dictionary_Lookup(ItemCount: 1000) 3.86 μs 1.5 ns 3.88 μs -0.3%
SwissDictionaryBenchmark.Dictionary_Lookup(ItemCount: 1000) 3.66 μs 87.8 ns 3.66 μs -0.0%
FrozenCelerityDictionaryBenchmark.FrozenCelerityDictionary_Lookup(ItemCount: 1000) 65.64 μs 467.2 ns 65.90 μs -0.4%
LongDictionaryBenchmark.LongDictionary_Lookup(ItemCount: 1000) 1.76 μs 8.1 ns 1.76 μs +0.1%
SwissDictionaryBenchmark.SwissDictionary_Lookup(ItemCount: 1000) 2.26 μs 3.1 ns 2.27 μs -0.1%
FrozenCelerityDictionaryBenchmark.FrozenDictionary_Lookup(ItemCount: 100000) 1.45 ms 7.17 μs 1.46 ms -0.4%
LongDictionaryBenchmark.Dictionary_Lookup(ItemCount: 100000) 1.22 ms 3.20 μs 1.24 ms -1.3%
SwissDictionaryBenchmark.Dictionary_Lookup(ItemCount: 100000) 1.23 ms 66.90 μs 1.24 ms -1.4%
FrozenCelerityDictionaryBenchmark.FrozenCelerityDictionary_Lookup(ItemCount: 100000) 6.63 ms 21.92 μs 6.60 ms +0.3%
LongDictionaryBenchmark.LongDictionary_Lookup(ItemCount: 100000) 560.41 μs 15.34 μs 532.02 μs +5.3%
SwissDictionaryBenchmark.SwissDictionary_Lookup(ItemCount: 100000) 528.76 μs 839.7 ns 523.79 μs +0.9%
LongDictionaryBenchmark.Dictionary_Remove(ItemCount: 1000) 66.82 μs 4.24 μs 65.11 μs +2.6%
PooledCeleritySetBenchmark.HashSet_Remove(ItemCount: 1000) 24.58 μs 2.77 μs 21.64 μs +13.6%
SwissDictionaryBenchmark.Dictionary_Remove(ItemCount: 1000) 60.15 μs 4.53 μs 57.99 μs +3.7%
LongDictionaryBenchmark.LongDictionary_Remove(ItemCount: 1000) 69.21 μs 4.05 μs 65.87 μs +5.1%
PooledCeleritySetBenchmark.PooledCeleritySet_Remove(ItemCount: 1000) 113.94 μs 7.25 μs 107.73 μs +5.8%
SwissDictionaryBenchmark.SwissDictionary_Remove(ItemCount: 1000) 55.32 μs 2.41 μs 56.99 μs -2.9%
CuckooFilterBenchmark.HashSet_Remove(ItemCount: 1000) 10.71 μs 63.9 ns 10.72 μs -0.1%
CuckooFilterBenchmark.CuckooFilter_Remove(ItemCount: 1000) 11.09 μs 27.7 ns 11.09 μs -0.1%
LongDictionaryBenchmark.Dictionary_Remove(ItemCount: 100000) 2.00 ms 366.54 μs 1.55 ms +29.0% ⚠️
PooledCeleritySetBenchmark.HashSet_Remove(ItemCount: 100000) 1.31 ms 15.35 μs 1.30 ms +0.8%
SwissDictionaryBenchmark.Dictionary_Remove(ItemCount: 100000) 1.57 ms 23.15 μs 1.56 ms +0.8%
LongDictionaryBenchmark.LongDictionary_Remove(ItemCount: 100000) 1.75 ms 372.89 μs 1.41 ms +24.4%
PooledCeleritySetBenchmark.PooledCeleritySet_Remove(ItemCount: 100000) 1.09 ms 54.76 μs 1.04 ms +4.4%
SwissDictionaryBenchmark.SwissDictionary_Remove(ItemCount: 100000) 1.08 ms 116.88 μs 1.86 ms -42.1%
CuckooFilterBenchmark.HashSet_Remove(ItemCount: 100000) 2.97 ms 43.41 μs 2.96 ms +0.3%
CuckooFilterBenchmark.CuckooFilter_Remove(ItemCount: 100000) 3.46 ms 3.12 μs 3.46 ms +0.1%
Hashers (100)
Benchmark This PR StdDev main Δ
StringHasherBenchmark.Bcl_GetHashCode(Shape: ShortAscii) 16.67 μs 18.3 ns 16.66 μs +0.1%
StringHasherBenchmark.EqualityComparer_Default(Shape: ShortAscii) 16.64 μs 11.3 ns 16.61 μs +0.1%
StringHasherBenchmark.Djb2(Shape: ShortAscii) 23.87 μs 39.9 ns 23.86 μs +0.0%
StringHasherBenchmark.Djb2A(Shape: ShortAscii) 23.85 μs 10.9 ns 23.86 μs -0.1%
StringHasherBenchmark.Sdbm(Shape: ShortAscii) 34.66 μs 15.5 ns 34.66 μs -0.0%
StringHasherBenchmark.Elf(Shape: ShortAscii) 43.14 μs 31.5 ns 43.14 μs +0.0%
StringHasherBenchmark.Crc32(Shape: ShortAscii) 54.73 μs 32.9 ns 54.73 μs +0.0%
StringHasherBenchmark.Adler32(Shape: ShortAscii) 108.62 μs 50.8 ns 108.63 μs -0.0%
StringHasherBenchmark.FnV1(Shape: ShortAscii) 28.61 μs 24.6 ns 28.60 μs +0.0%
StringHasherBenchmark.FnV1_64(Shape: ShortAscii) 28.02 μs 16.0 ns 28.04 μs -0.0%
StringHasherBenchmark.FnV1A(Shape: ShortAscii) 12.71 μs 7.8 ns 12.72 μs -0.1%
StringHasherBenchmark.FnV1A_Full(Shape: ShortAscii) 24.63 μs 11.7 ns 24.65 μs -0.1%
StringHasherBenchmark.FnV1A_64(Shape: ShortAscii) 29.53 μs 15.7 ns 29.53 μs -0.0%
StringHasherBenchmark.JenkinsOaat(Shape: ShortAscii) 41.05 μs 27.4 ns 41.06 μs -0.0%
StringHasherBenchmark.Murmur2(Shape: ShortAscii) 15.92 μs 11.6 ns 15.92 μs +0.0%
StringHasherBenchmark.Murmur3(Shape: ShortAscii) 18.20 μs 9.1 ns 18.20 μs +0.0%
StringHasherBenchmark.XxHash32(Shape: ShortAscii) 17.45 μs 19.1 ns 17.42 μs +0.2%
StringHasherBenchmark.XxHash64(Shape: ShortAscii) 19.91 μs 11.9 ns 19.91 μs +0.0%
StringHasherBenchmark.XxHash3(Shape: ShortAscii) 18.16 μs 34.3 ns 18.11 μs +0.3%
StringHasherBenchmark.CityHash64(Shape: ShortAscii) 16.63 μs 20.1 ns 16.64 μs -0.1%
StringHasherBenchmark.MetroHash64(Shape: ShortAscii) 16.86 μs 8.1 ns 16.86 μs +0.0%
StringHasherBenchmark.SipHash13(Shape: ShortAscii) 30.72 μs 18.7 ns 30.71 μs +0.1%
StringHasherBenchmark.SipHash24(Shape: ShortAscii) 43.24 μs 36.1 ns 43.24 μs -0.0%
StringHasherBenchmark.HalfSipHash24(Shape: ShortAscii) 56.04 μs 45.2 ns 56.00 μs +0.1%
StringHasherBenchmark.HighwayHash64(Shape: ShortAscii) 447.44 μs 335.3 ns 449.18 μs -0.4%
StringHasherBenchmark.Bcl_GetHashCode(Shape: LongAscii) 108.15 μs 28.6 ns 108.18 μs -0.0%
StringHasherBenchmark.EqualityComparer_Default(Shape: LongAscii) 108.44 μs 28.0 ns 108.46 μs -0.0%
StringHasherBenchmark.Djb2(Shape: LongAscii) 247.99 μs 135.8 ns 247.98 μs +0.0%
StringHasherBenchmark.Djb2A(Shape: LongAscii) 248.01 μs 164.0 ns 247.88 μs +0.1%
StringHasherBenchmark.Sdbm(Shape: LongAscii) 342.92 μs 136.8 ns 342.84 μs +0.0%
StringHasherBenchmark.Elf(Shape: LongAscii) 632.49 μs 7.53 μs 632.05 μs +0.1%
StringHasherBenchmark.Crc32(Shape: LongAscii) 661.43 μs 175.7 ns 661.46 μs -0.0%
StringHasherBenchmark.Adler32(Shape: LongAscii) 882.60 μs 1.15 μs 882.24 μs +0.0%
StringHasherBenchmark.FnV1(Shape: LongAscii) 321.81 μs 75.3 ns 321.85 μs -0.0%
StringHasherBenchmark.FnV1_64(Shape: LongAscii) 319.79 μs 94.8 ns 319.80 μs -0.0%
StringHasherBenchmark.FnV1A(Shape: LongAscii) 133.02 μs 94.2 ns 133.05 μs -0.0%
StringHasherBenchmark.FnV1A_Full(Shape: LongAscii) 313.17 μs 134.8 ns 313.16 μs +0.0%
StringHasherBenchmark.FnV1A_64(Shape: LongAscii) 319.40 μs 161.4 ns 319.36 μs +0.0%
StringHasherBenchmark.JenkinsOaat(Shape: LongAscii) 422.52 μs 146.1 ns 422.49 μs +0.0%
StringHasherBenchmark.Murmur2(Shape: LongAscii) 99.56 μs 2.97 μs 100.01 μs -0.5%
StringHasherBenchmark.Murmur3(Shape: LongAscii) 113.27 μs 497.0 ns 113.09 μs +0.2%
StringHasherBenchmark.XxHash32(Shape: LongAscii) 76.60 μs 59.2 ns 76.60 μs -0.0%
StringHasherBenchmark.XxHash64(Shape: LongAscii) 93.39 μs 41.8 ns 93.42 μs -0.0%
StringHasherBenchmark.XxHash3(Shape: LongAscii) 84.66 μs 62.6 ns 84.75 μs -0.1%
StringHasherBenchmark.CityHash64(Shape: LongAscii) 133.26 μs 104.0 ns 133.24 μs +0.0%
StringHasherBenchmark.MetroHash64(Shape: LongAscii) 82.35 μs 116.5 ns 82.55 μs -0.2%
StringHasherBenchmark.SipHash13(Shape: LongAscii) 115.69 μs 170.6 ns 115.68 μs +0.0%
StringHasherBenchmark.SipHash24(Shape: LongAscii) 169.72 μs 95.4 ns 169.71 μs +0.0%
StringHasherBenchmark.HalfSipHash24(Shape: LongAscii) 272.03 μs 166.9 ns 272.22 μs -0.1%
StringHasherBenchmark.HighwayHash64(Shape: LongAscii) 774.93 μs 2.54 μs 781.22 μs -0.8%
StringHasherBenchmark.Bcl_GetHashCode(Shape: NonAscii) 25.07 μs 9.5 ns 25.08 μs -0.0%
StringHasherBenchmark.EqualityComparer_Default(Shape: NonAscii) 25.03 μs 44.5 ns 25.01 μs +0.1%
StringHasherBenchmark.Djb2(Shape: NonAscii) 43.27 μs 31.5 ns 43.24 μs +0.1%
StringHasherBenchmark.Djb2A(Shape: NonAscii) 43.25 μs 18.9 ns 43.26 μs -0.0%
StringHasherBenchmark.Sdbm(Shape: NonAscii) 65.11 μs 30.1 ns 65.13 μs -0.0%
StringHasherBenchmark.Elf(Shape: NonAscii) 87.51 μs 81.7 ns 87.48 μs +0.0%
StringHasherBenchmark.Crc32(Shape: NonAscii) 111.34 μs 56.3 ns 111.29 μs +0.0%
StringHasherBenchmark.Adler32(Shape: NonAscii) 193.43 μs 77.8 ns 193.42 μs +0.0%
StringHasherBenchmark.FnV1(Shape: NonAscii) 51.08 μs 34.5 ns 51.05 μs +0.1%
StringHasherBenchmark.FnV1_64(Shape: NonAscii) 51.20 μs 46.0 ns 51.18 μs +0.0%
StringHasherBenchmark.FnV1A(Shape: NonAscii) 23.66 μs 19.5 ns 23.67 μs -0.0%
StringHasherBenchmark.FnV1A_Full(Shape: NonAscii) 46.81 μs 24.3 ns 46.81 μs +0.0%
StringHasherBenchmark.FnV1A_64(Shape: NonAscii) 51.86 μs 33.3 ns 51.85 μs +0.0%
StringHasherBenchmark.JenkinsOaat(Shape: NonAscii) 77.57 μs 46.7 ns 77.54 μs +0.0%
StringHasherBenchmark.Murmur2(Shape: NonAscii) 24.56 μs 19.6 ns 24.56 μs +0.0%
StringHasherBenchmark.Murmur3(Shape: NonAscii) 27.67 μs 14.1 ns 27.69 μs -0.1%
StringHasherBenchmark.XxHash32(Shape: NonAscii) 24.57 μs 13.5 ns 24.57 μs +0.0%
StringHasherBenchmark.XxHash64(Shape: NonAscii) 32.37 μs 58.9 ns 32.41 μs -0.1%
StringHasherBenchmark.XxHash3(Shape: NonAscii) 28.86 μs 49.9 ns 28.83 μs +0.1%
StringHasherBenchmark.CityHash64(Shape: NonAscii) 23.75 μs 12.5 ns 23.77 μs -0.1%
StringHasherBenchmark.MetroHash64(Shape: NonAscii) 27.53 μs 25.0 ns 27.65 μs -0.5%
StringHasherBenchmark.SipHash13(Shape: NonAscii) 39.72 μs 25.4 ns 39.76 μs -0.1%
StringHasherBenchmark.SipHash24(Shape: NonAscii) 56.99 μs 45.0 ns 56.98 μs +0.0%
StringHasherBenchmark.HalfSipHash24(Shape: NonAscii) 79.26 μs 37.4 ns 79.32 μs -0.1%
StringHasherBenchmark.HighwayHash64(Shape: NonAscii) 484.52 μs 2.18 μs 486.05 μs -0.3%
IntegerHasherBenchmark.Guid_Bcl 1.27 μs 2.8 ns 1.26 μs +0.5%
IntegerHasherBenchmark.Guid_EqualityComparer 3.49 μs 16.0 ns 3.52 μs -1.0%
IntegerHasherBenchmark.Guid_Celerity 8.02 μs 6.6 ns 8.04 μs -0.2%
IntegerHasherBenchmark.Int32_Bcl 684.4 ns 2.2 ns 685.8 ns -0.2%
IntegerHasherBenchmark.Int32_EqualityComparer 700.4 ns 2.4 ns 704.2 ns -0.5%
IntegerHasherBenchmark.Int32_Identity 683.9 ns 1.1 ns 684.1 ns -0.0%
IntegerHasherBenchmark.Int32_WangNaive 1.25 μs 1.3 ns 1.25 μs +0.0%
IntegerHasherBenchmark.Int32_Wang 3.02 μs 2.0 ns 3.02 μs +0.1%
IntegerHasherBenchmark.Int32_Murmur3 2.65 μs 2.0 ns 2.65 μs +0.0%
IntegerHasherBenchmark.Int64_Bcl 1.27 μs 0.9 ns 1.27 μs -0.1%
IntegerHasherBenchmark.Int64_EqualityComparer 1.25 μs 2.7 ns 1.25 μs +0.1%
IntegerHasherBenchmark.Int64_Identity 684.0 ns 0.7 ns 683.7 ns +0.0%
IntegerHasherBenchmark.Int64_WangNaive 1.87 μs 1.4 ns 1.87 μs -0.0%
IntegerHasherBenchmark.Int64_Wang 4.16 μs 6.0 ns 4.16 μs +0.0%
IntegerHasherBenchmark.Int64_Murmur3 2.37 μs 1.8 ns 2.37 μs +0.0%
IntegerHasherBenchmark.UInt32_Bcl 700.1 ns 8.4 ns 685.6 ns +2.1%
IntegerHasherBenchmark.UInt32_EqualityComparer 703.9 ns 4.8 ns 693.6 ns +1.5%
IntegerHasherBenchmark.UInt32_Default 1.25 μs 0.6 ns 1.25 μs -0.0%
IntegerHasherBenchmark.UInt32_Wang 3.02 μs 1.7 ns 3.02 μs -0.0%
IntegerHasherBenchmark.UInt32_Murmur3 2.64 μs 0.8 ns 2.65 μs -0.1%
IntegerHasherBenchmark.UInt64_Bcl 1.27 μs 1.7 ns 1.27 μs +0.1%
IntegerHasherBenchmark.UInt64_EqualityComparer 1.25 μs 0.6 ns 1.25 μs -0.0%
IntegerHasherBenchmark.UInt64_Default 2.37 μs 2.2 ns 2.37 μs -0.0%
IntegerHasherBenchmark.UInt64_Wang 4.16 μs 4.1 ns 4.16 μs -0.0%
IntegerHasherBenchmark.UInt64_WangNaive 1.87 μs 1.0 ns 1.87 μs +0.0%

Same-runner A/B (sharded 6-way): main (b48cd75) and this PR were built and benchmarked back-to-back on the same runner per shard, so hardware variance cancels out. ⚠️ = PR mean ≥ +10% slower than main and beyond combined std-dev; ✅ = correspondingly faster.

…er Dispose

PooledCelerityDictionary and PooledCeleritySet document that "after Dispose
every member throws ObjectDisposedException", but the read accessors Count
(both types) and Keys / Values (dictionary) skipped ThrowIfDisposed(). Since
Dispose zeroes _count and returns the backing arrays to ArrayPool.Shared, a
post-dispose read returned a silent, misleading result (0, or an empty view)
over buffers the pool may have re-handed out. Gate all three on
ThrowIfDisposed() so the code matches the documented contract, and extend the
UseAfterDispose regression tests to cover them.

Closes #296

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@marius-bughiu
marius-bughiu force-pushed the fix/issue-296-pooled-disposed-accessors branch from a3778c9 to 5821262 Compare July 24, 2026 01:08
Copilot AI review requested due to automatic review settings July 24, 2026 01:08
@marius-bughiu

Copy link
Copy Markdown
Owner Author

Rebased onto main to resolve the CHANGELOG.md [Unreleased] conflict (main had gained the Trie ### Added block from #286; this PR's ### Fixed block now sits after it per Keep a Changelog ordering). No source/test changes in the rebase. Rebuilt and re-ran the Pooled test suite locally on net10.0 — 233 passed. PR is now mergeable.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 5 out of 5 changed files in this pull request and generated no new comments.

@marius-bughiu
marius-bughiu merged commit 528540b into main Jul 24, 2026
15 checks passed
@marius-bughiu
marius-bughiu deleted the fix/issue-296-pooled-disposed-accessors branch July 24, 2026 22:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Pooled collections: Count/Keys/Values don't throw after Dispose despite documented contract

2 participants