~/talk

“Pessimistic Programming”

Talkat CppCon 2018 · 2018-09-23..09-28
links:none on file
slides:none on file

Benchmarks of a million iterations show exceptions for rare errors can be as fast as optionals in the common case but catastrophically slower in the worst case. Practical, tested techniques include using deque instead of vector when front inserts reduce jitter, nonblocking patterns like try_lock and timed waits and a cheap concurrent queue to bound latency, slicing work with time budgets or resumable coroutines, and writing constant-time comparisons to avoid timing leaks. Slides and source code live on the CppCon2018 GitHub.

AI-written summary · about

  1. 0:00Introduction and background
  2. 3:58Why focus on worst case
  3. 8:14Exceptions vs optional performance
  4. 11:30Vector vs deque trade-offs
  5. 13:21Stable processing rates
  6. 20:53Polling vs event-driven models
  7. 25:03Compiler assumptions and control
  8. 30:13Non-blocking techniques
  9. 33:11Likely and unlikely branches
  10. 34:38Small functions and time management
  11. 37:06Progressive computation steps
  12. 41:26Critical vs accessory tasks
  13. 43:13Coroutines for resumable functions
  14. 45:21Timing attacks and security
  15. 52:05Q&A and conclusion
~/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.