Skip to content

Commit 35fe81a

Browse files
committed
interesting todos for #57
1 parent eed5e6c commit 35fe81a

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

src/ImTools/ImTools.cs

+2
Original file line numberDiff line numberDiff line change
@@ -6926,6 +6926,8 @@ public class DebugProxy<K, V, TEq, TEntries>
69266926
// todo: @improve ? how/where to add SIMD to improve CPU utilization but not losing perf for smaller sizes
69276927
// todo: @perf We may use Stack-on-stack data structure similar to FastExrpressionCompiler.Stack4 for packed hashes up to 4 or more.
69286928
// todo: @perf In case of using RefEq it might be faster for the small map to lookup by comparing entry key instead of reaching for hash
6929+
// todo: @perf We may additionally implement the Enumerator for the Entries or just expose the array for the SingleArrayEntries to allow fastest iteration without checks for Removed! entries (if you have knowledge the nothing is removed ever).
6930+
// todo: @perf ...related to the Enumerator above, another option is to expose GetIncludingRemovedEntriesEnumerator() on the map itself
69296931

69306932
/// <summary>
69316933
/// Fast and less-allocating hash map without thread safety nets. Please measure it in your own use case before use.

test/ImTools.UnitTests/FHashMapTests.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -510,7 +510,7 @@ public static void VerifyNoDuplicateKeys<K, V, TEq, TEntries>(this FHashMap<K, V
510510
if (h == 0)
511511
continue;
512512
var key = map.Entries.GetSurePresentEntryRef(h & indexMask).Key;
513-
if (!uniq.TryGetValue(key, out _))
513+
if (!uniq.ContainsKey(key))
514514
uniq.Add(key, 1);
515515
else
516516
Assert.Fail($"Duplicate key: {key}");

0 commit comments

Comments
 (0)