~/talk

The Mysterious Swift Performance

Talkat Mobius 2017 Piter · 2017-04-21..04-22· [swift]
slides:none on file

CryptoSwift development surfaces concrete speed levers: build with -O and whole-module optimizations, prefer release over debug (debug ~30x slower), use unchecked arithmetic for ~2–3% gains and inout/address-passing to avoid copies (one refactor yields 5x faster), prefer simple for-in loops to map/reduce, reserveCapacity for arrays, and prefer stack or static data over heap; an example goes 0.5s -> 0.065s -> 0.0116s -> 0.007s as storage moves from heap to stack to static data. Use @specialize on hot generics and run perf tests to detect regressions.

AI-written summary · about

  1. 0:00Welcome and introduction
  2. 1:27Swift performance background
  3. 6:27Compiled vs script Swift
  4. 11:56Compiler flow and optimizations
  5. 13:03Basic Swift optimizations
  6. 16:44Struct vs class performance
  7. 18:17Loop and collection optimizations
  8. 22:05Function inlining techniques
  9. 26:33Stack vs heap allocation
  10. 33:34Real-world optimization example
  11. 39:23Array vs ArraySlice trade-offs
  12. 42:57Generic specialization impact
  13. 49:16Debug vs release performance testing
  14. 50:23Q&A session
~/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.