mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
stdlib: replace _squeezeHashValue with a specialized version for power-of-2 ranges.
This function is only used for Set and Dictionary and there the range (which is the capacity) is always a power of 2.
This commit is contained in:
@@ -2805,7 +2805,7 @@ struct _Native${Self}Storage<${TypeParametersDecl}> :
|
||||
|
||||
@_versioned
|
||||
internal func _bucket(_ k: Key) -> Int {
|
||||
return _squeezeHashValue(k.hashValue, 0..<capacity)
|
||||
return _squeezeHashValue(k.hashValue, capacity)
|
||||
}
|
||||
|
||||
@_versioned
|
||||
|
||||
Reference in New Issue
Block a user