~/talk

Better C++ ranges

Talkat Meeting C++ 2023 · 2023-11-12..11-14· [frontend-architecture]
links:none on file
slides:none on file

think-cell ships a C++ ranges library evolved over 20 years that stays compatible with C++20 but replaces fat iterators with an index abstraction so stacked adaptors stay tiny and efficient, lets adaptors hold data to be self-contained, adds internal iteration so generators and formatters run like handwritten loops, and custom return traits that remove end checks. Measured results show iterator-based code wastes 50% extra cost while internal-iteration paths hit about 15% overhead, used successfully for lazy text formatting and an HTTP server.

AI-written summary · about

  1. 0:00Introduction
  2. 1:06Why use ranges
  3. 4:35Sorting and erasing
  4. 6:01Basics of ranges
  5. 7:06Transform and filter
  6. 12:46Iterator size growth
  7. 17:01Index-based ranges
  8. 23:25Singleton results
  9. 26:13Visitor patterns to ranges
  10. 31:31Internal vs external
  11. 38:53Unifying ranges with formatting
  12. 45:18Formatting containers
  13. 51:41String construction perf
  14. 56:39Conclusion
  15. 57:24Q&A
~/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.