Thursday, October 6, 2016

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 RSS · Twitter

[…] Reducing Swift Compile Time […]

Leave a Comment