Friday, January 8, 2016

Slow Swift Array Type Inference

Benjamin Encz:

Slow compile time in Swift? Try to rearrange some of your expressions.

Update (2016-01-20): Bryan Irace (tweet):

I had a problem. The new iOS application that I’m working on – written 100% in Swift – was noticeably taking much longer to compile than should, given its size (~200 files). More concerning, it was suddenly a lot slower than only a couple of weeks prior. I needed to get to the root of the problem as soon as possible, before it got any worse.

The first step was to add -Xfrontend -debug-time-function-bodies to my Swift compiler flags […] This causes the compiler to print out how long it takes to compile each function […]

Comments RSS · Twitter

Leave a Comment