mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
Actually: generate the array of (key, value) tuples in the data section, which is then passed to Dictionary.init(dictionaryLiteral:) We already do this for simple arrays, e.g. arrays with trivial element types. The only change needed for dictionary literals is to support tuple types in the ObjectOutliner. The effect of this optimization is a significant reduction in code size for dictionary literals - and an increase in data size. But in most cases there is a considerable net win for code+data size in total.
21 KiB
21 KiB