swift: [SR-16027] Compilation speed slowed 200x on Apple Silicon in Swift 5.6

Previous ID SR-16027
Radar rdar://problem/90549915
Original Reporter @kylebshr
Type Bug

Attachment: Download

Environment

Xcode 13.3 (13E113) on MacBook Pro with M1 Max

Additional Detail from JIRA
Votes 7
Component/s
Labels Bug
Assignee None
Priority Medium

md5: 0e1978f4b3feb8996e64b02dd75f5410

Issue Description:

Compiling the attached Accessory.swift file is 200x slower with Swift 5.6 (shipped with Xcode 13.3) vs. Swift 5.5 (shipped with Xcode 13.2.1). I spend a little time trying to get a small code sample, but didn’t want to waste too much more time since it’s not much code. (Twitter thread: https://twitter.com/kylebshr/status/1505752387947941888)

Co-worker with an Intel machine says it’s not (noticeably) slower.

Swift 5.5:
time swiftc Accessory.swift
swiftc Accessory.swift 2.27s user 0.93s system 44% cpu 7.270 total

Swift 5.6
time swiftc Accessory.swift
swiftc Accessory.swift 483.18s user 1.27s system 99% cpu 8:05.03 total

About this issue

  • Original URL
  • State: open
  • Created 2 years ago
  • Comments: 17 (1 by maintainers)

Most upvoted comments

I’m no longer seeing the regression in Xcode 13.4 RC that was released today, so must have made it into Swift 5.7 in the past couple weeks

It’s not