Skip to content

Conversation

iainsmith
Copy link
Contributor

@iainsmith iainsmith commented Jun 3, 2021

Description

Improve compile times for consumers using older versions of Xcode/swift. This change significantly improves compile times when using Swift 5.3.2. More details & benchmarks in #146

Edit - Pushed a small change to the wording of the comment

@iainsmith iainsmith changed the title Remove compilation bottleneck Remove compilation bottleneck for Swift 5.3.2 builds Jun 5, 2021
Benchmarks on Xcode 12.4 showed compiling / type checking
StrideCollection.offsetBackward was the bottleneck for building
the package. Replacing the ternary operator in that function
with an explicit if/else removes the bottleneck.
@natecook1000
Copy link
Member

@swift-ci Please test

Copy link
Contributor

@xwu xwu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd be curious to see if compile times can be addressed on Swift 5.3.2 by replacing each occurrence of literal 1 with (1 as Int).

Co-authored-by: Xiaodi Wu <13952+xwu@users.noreply.github.com>
@LucianoPAlmeida
Copy link
Contributor

@swift-ci Please test

@iainsmith
Copy link
Contributor Author

iainsmith commented Jun 19, 2021

Looks like the Mac agent failed to clone the repo

git fetch --tags --force --progress -- git@github.com:apple/swift-algorithms.git +refs/heads/*:refs/remotes/origin/* # timeout=10
07:07:37 ERROR: Error cloning remote repo 'origin'
07:07:37 hudson.plugins.git.GitException: Command "git fetch --tags --force --progress -- 

@natecook1000
Copy link
Member

@swift-ci Please test

@natecook1000 natecook1000 merged commit 50be2c8 into apple:main Jun 21, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants