“Range-Based Text Formatting For a Future Range-Based Standard Library”
summary
think-cell implements a range-based formatter that treats values as lazily generated character ranges, adds an internal iteration model plus customization points called appender and chunk, and composes ranges with concat and as_dec formatters. Benchmarks show iterator-based ranges are ~50% slower than a hand-written tight loop, while internal-iteration ranges are ~15% slower; avoiding end-checks on reserved buffers saves ~20%. Code targets recent C++ compilers, still uses parts of Boost, and is on GitHub under a Boost license.
AI-written summary · about
chapters (11)
- 0:00Introduction to text formatting
- 1:06Format strings vs C++ syntax
- 9:42Why ranges for formatting
- 12:56Ranges in text formatting
- 14:21Concatenation with ranges
- 20:46Implementing formatters lazily
- 22:32Performance optimizations
- 27:15Internal vs external iteration
- 35:51Benchmarking performance
- 42:57Library availability and future
- 43:26Q&A session
related talks
01h 13mFrom Iterators to Ranges — the Upcoming Evolution of the Standard Library
51mWhat Is a Range in C++?
58mMore C++ Ranges Please
01h 21mC++ MythBusters
50mReusable C++ Code, Reusable C++ Data Structures
01h 34mC++11/14 at Scale - What Have We Learned?
01h 00m“Evolving array_view and string_view for safe C++ code"
56mWrite Fast Code Like a Native
