~/talk

Down the memory rabbit hole

Talkat FrenchKit SE 2020 · on Friday, 2020-10-02· [ios]
slides:none on file

Shows that Swift collections use copy-on-write implemented by a private class storage and checked with isUniquelyReferenced to avoid needless copies. Measuring a small Vector copy costs about 500 ns; large structs cost much more, while a class copy (pointer + refcount) is faster. Implements a Storage class plus computed accessors and explains the underscore modify accessor that yields a mutable reference to avoid double-copying computed properties. Warns about complexity, pitfalls with enums and wrappers, and recommends profiling with Xcode Instruments before optimizing.

AI-written summary · about

  1. 0:00Start
  2. 1:34Value Semantics
  3. 2:03Classes
  4. 4:21Summary
  5. 5:02Performances
  6. 6:41How Long Does It Take To Duplicate a Class
  7. 21:08Benchmark Your Code
~/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.