Profiling Swift Performance on Linux
summary
Profiling Swift on Linux uses concrete tools and measurements: prefers perf on bare metal over valgrind/callgrind in VMs, and compares with instruments.app when possible. A case study on Swift lint shows 90+ rules where one rule, let var whitespace, consumes ~1.5s — about 20% of total run time. Adding an app-specific benchmark mode, flame graphs and symbol demangling reveals a regex hotspot; replacing the regex with a simple attribute check eliminates the hotspot and speeds the tool.
AI-written summary · about
chapters (7)
- 0:00Swift on Linux challenges
- 3:09Profiling tool alternatives
- 7:35Case study: SwiftLint
- 14:50Analyzing performance data
- 17:38Optimization with perf
- 24:31Closing thoughts and tips
- 26:47Q&A and community insights








