~/talk

Slow Swift

Talkat iOS Conf SG 2017 · 2017-10-19..10-20· [swift]
slides:none on file

Work on CryptoSwift and ObjectivePGP shows compiled Swift is fast but the REPL and debug builds are extremely slow — 500–1000× slower in practice — so always benchmark optimized builds. Compiler pain points: a single function once took 60s → <1s to compile after removing bit shifts; generics benefit from specialization (example: unspecialized generic method 20ms versus 20ms → 0.06ms when specialized). Use -O/-Owholemodule, reserveCapacity to avoid reallocations, prefer inout for heavy mutations, and consider disabling runtime safety checks when safe.

AI-written summary · about

  1. 0:00Intro
  2. 0:36Marcin Krzyżanowski
  3. 2:42Why Swift?
  4. 4:02Script Swift?
  5. 5:21Compiled Swift
  6. 8:07Compilation
  7. 12:06Source Optimization
  8. 21:34Memory
  9. 27:18Allocation
  10. 34:14Generics & Optimization
  11. 35:07Let's Recap...
~/search
type to search 6,249 conferences, 138,987 speakers and 185,172 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.