~/talk

Back to Basics: Algorithmic Complexity

Talkat CppCon 2021 · on Friday, 2021-10-29· at 14:45· online· [frontend-architecture]
links:none on file
slides:none on file

Defines big‑O and counts loops to give concrete claims: amortized O(1) for vector::push_back with exponential growth of capacity; std::nth_element/quickselect is linear on average while median‑of‑medians guarantees worst‑case linear (spec allows quadratic worst case for practical implementers); unordered_map has average O(1) but worst case O(n); benchmarks (using QuickBench) show copying a list into a vector then sorting is faster than sorting the list; discusses actual numbers, memory locality, 64‑bit log limits, and time/space tradeoffs.

AI-written summary · about

  1. 0:00Intro
  2. 0:45Why this talk
  3. 2:26Performance
  4. 11:29Quiz
  5. 13:28Pushback to vector
  6. 19:31Sorting a vector
  7. 25:20Unordered map
  8. 28:48Constant complexity
  9. 30:29Bubble sort
  10. 31:53Exponential time
  11. 33:21Ignore the constant
  12. 36:02Two calls to std
  13. 37:58Ranges
  14. 38:34Best Practices
  15. 39:31Break Out
  16. 40:11Time Out
  17. 41:31Microcurrencies
  18. 43:53Indexing
  19. 44:18Sorting
  20. 44:50Branch prediction
  21. 47:53Summary
  22. 48:58Worst Case Complexity
  23. 49:53Space Complexity
~/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.