The following article shows how to use Instruments to find the slow spots in your iOS and Mac apps:
Swift Dev JournalFind the Slow Spots in Your Code with the CPU Profiler InstrumentIf you find your Swift app is running slowly, Instruments includes a CPU Profiler instrument to help you find the code causing your app to run slowly. This article shows you how to use the CPU Profiler instrument to find the slow code in your app.
NOTE
Since I wrote this article, Apple made some changes to the CPU Profiler instrument. Instead of having Weight and Self Weight columns, there are Cyl