We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 81b64ca commit 9cc24d2Copy full SHA for 9cc24d2
1 file changed
Src/FastData/FastDataGenerator.cs
@@ -151,7 +151,14 @@ private static IEnumerable<IStructure<T>> GetDataStructureCandidates<T>(T[] data
151
else if (ds == StructureType.BinarySearch)
152
yield return new BinarySearchStructure<T>(props.DataType, DefaultStringComparison);
153
else if (ds == StructureType.HashSet)
154
- yield return new HashSetChainStructure<T>(HashData.Create(data, props.DataType, config.HashCapacityFactor));
+ {
155
+ HashData hashData = HashData.Create(data, props.DataType, config.HashCapacityFactor);
156
+
157
+ if (hashData.HashCodesPerfect)
158
+ yield return new HashSetPerfectStructure<T>(hashData);
159
160
+ yield return new HashSetChainStructure<T>(hashData);
161
+ }
162
else
163
throw new InvalidOperationException($"Unsupported DataStructure {ds}");
164
}
0 commit comments