~/talk

Optimizing Swift Collections

Talkat dotSwift 2017 · on Friday, 2017-01-27· [swift]
slides:none on file

Implements an ordered-set protocol in Swift and compares concrete implementations: wrapping NSOrderedSet, a sorted array, a red-black tree and finally an inlined, cache-aware B-tree. Claims include a sorted array being up to 40× faster than NSOrderedSet for small sizes, red‑black giving ~2.5× better worst‑case than NSOrderedSet, a 200k element sorted array taking ~4s, a 4,000‑element/L1‑cache threshold (~32KB), and a 3 million insert benchmark where the B‑tree is fastest.

AI-written summary · about

  1. 0:00Intro
  2. 0:28Overview
  3. 1:50NS Ordered Set
  4. 3:31Array Representation
  5. 4:20Insert
  6. 5:23Search Tree
  7. 5:48Tree Structure
  8. 6:10Tree Representation
  9. 6:50RedBlack Trees
  10. 7:31Inorder Work
  11. 7:58Insertion
  12. 10:01Performance
  13. 12:29Copyonwrite
  14. 13:06Unique Reference
  15. 14:14Results
  16. 15:19Division Line
  17. 15:50Sorting Arrays
  18. 17:05Inline Implementation
  19. 18:05Summary
  20. 18:59Outro
~/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.