private bool ConfirmSlot(int hashCode) { GenerateIndexes(hashCode); if (Shortcuts.GetBit(bucketAllocation[bigIndex], smallIndex)) { if (bucketHashes [leIndex] == hashCode) { return(true); } } return(false); }
private bool _Add(int hashCode, TValue item) { if (ForceStop) { return(false); } GenerateIndexes(hashCode); if (Shortcuts.GetBit(bucketAllocation[bigIndex], smallIndex)) { if (bucketHashes [leIndex] == hashCode) { return(false); } //Resolve collision return(_Add(hashCode * CollisionResolver, item)); } Shortcuts.SetBitTrue(ref bucketAllocation [bigIndex], smallIndex); bucketValues [leIndex] = item; bucketHashes [leIndex] = hashCode; return(true); }