mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
Make getDesugaredType() as fast as possible for now. With the old way: 1) Switching over the sugared types turned into a frequently mispredicted branch because the sugar in the type system is random as far as the processor is concerned. 2) Storing the underlying/singlely-desugared type at different offsets in memory adds more code bloat and misprediction. Short of a major redesign to avoid pointer chasing, this is probably as fast as the method will get.
5.5 KiB
5.5 KiB