~/talk

Range-Based Text Formatting - For a Future Range-Based Standard Library

Talkat C++ on Sea 2021 · 2021-06-30..07-02· [c-and-cpp]
links:none on file
slides:none on file

Proposes replacing format strings with C++20-style ranges that produce lazily evaluated character sequences: formatters are generator ranges that capture values and only render on iteration, avoiding per-piece heap allocations and doing a single allocation at the end. Implements an explicit-cast-to-string, custom appenders with a chunk hook for pre-reserve, and a swapped model using internal iteration so iteration is produced-from-bottom-of-stack. Benchmarks show iterator-based ranges cost ~50% vs hand code, internal-iteration ranges cost about 15% slower than hand-optimized code.

AI-written summary · about

  1. 0:00Intro
  2. 3:14Format Strings: Cons
  3. 7:28Format Strings: 18N
  4. 15:27Essence of Ranges
  5. 21:55Ranges for Text Formatting (1)
  6. 33:36Avoid Heap Allocation For Components think-cell
  7. 35:42Fast Formatting Into Containers
  8. 40:41Iterators Cost Performance
  9. 43:28External iteration (2)
  10. 55:44Performance: Future Work
~/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.