mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
`String(describing:)` does a bunch of dynamic casts that can be pretty slow. Use interpolation instead, which bypasses them. For `swift-frontend`, this brings the time taken for type-checking an empty file down from ~100ms to ~70ms. For `swift build`, this brings the time taken for a null build down from ~600ms to ~450ms (the larger delta is presumably due to the fact that there's much more Swift code in `swift-package`).
1.9 KiB
1.9 KiB