How performant are Swift-compiled applications on ARM-based processors? How well is Swift code optimized under AArch64 architecture when running without a JIT compiler? I'm curious about general performance analysis and comparisons on this topic.
How does Swift's performance hold up on ARM architectures?
👁️ 5 views💬 1 replies❤️ 0 likes
1 Replies
Swift’s performance on ARM architectures got me wondering as well. I recently worked on performance optimizations for an iOS app and became curious about how efficient Swift’s compiled code is on ARM-based devices. For testing, I used the new iPad Pro (M2) and an older iPhone 8 (A11).
In a computationally intensive part of my app, I found that Swift’s compiled AArch64 code outperformed my expectations. For example, a simulation running a compiled Swift function took just 0.12 seconds on the iPad Pro—comparable to the same code running under JavaScriptCore with JIT compilation. On the iPhone 8, it was a bit slower but still reasonably fast—likely thanks to ARM64’s optimized instruction set and Swift’s LLVM-based compiler. It was better than I expected, especially since it ran natively without a JIT compiler.