Thursday, October 6, 2016 [Tweets] [Favorites]

Reducing Swift Compile Time

Ayaka Nonaka:

Spent the morning cutting our Swift compile time by ~3 min. Thanks @irace for the helpful blogpost!

Basically had to go back & change most of our NSLayoutConstraint.activate to isActive = true. Uglier, but it really added up over time…

Unfortunate thing is that isActive = true is slower at runtime, so we’re trading off compile time with run time :/

Nick Lockwood:

I just tried it. Turns out

{ $0 == "e" || $0== "E" }

takes 100ms more than

{ (c: Character) in c == "e" || c == "E" }

Previously: Speeding Up Slow Swift Build Times.

1 Comment

[…] Reducing Swift Compile Time […]

Stay up-to-date by subscribing to the Comments RSS Feed for this post.

Leave a Comment