Skip to content

Commit 4887fcf

Browse files
authored
Merge pull request #19663 from lorentey/default-subscript-is-slow
[stdlib] Force-inline Dictionary.subscript(_:, default:)._modify
2 parents 18f118a + 5c04ebf commit 4887fcf

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

stdlib/public/core/Dictionary.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -933,6 +933,7 @@ extension Dictionary {
933933
get {
934934
return _variant.lookup(key) ?? defaultValue()
935935
}
936+
@inline(__always)
936937
_modify {
937938
let (bucket, found) = _variant.mutatingFind(key)
938939
let native = _variant.asNative

0 commit comments

Comments
 (0)