If your Xcode project isn't compiling as fast as you expect, open the build settings of target that you're building. Add the following to the "Other Swift Flags" setting:
-Xfrontend -warn-long-expression-type-checking=100
This makes the compiler emit warnings when it takes more than 100 ms to type-check an expression.