CppCon 2018: Hana Dusíková “Compile Time Regular Expressions”
CppCon1 HN recommenders · 2020–2025
14K views · talk · evergreen · Uploaded 2018-10-24
Hana Dusikova's CppCon 2018 talk presenting a C++ library that builds regular expressions from compile-time strings, using a C++20 feature. It avoids runtime parsing cost and covers implementation details, problems she hit, and benchmarks.
Pointed to as the canonical presentation of compile-time regex in C++ and its template metaprogramming, including benchmark results.
36:45Rich Harris - Rethinking reactivity
You Gotta Love Frontend
1:12:27CppCon 2015: Andrei Alexandrescu “std::allocator...”
CppCon
51:18Lexical Scanning in Go - Rob Pike
GoogleFOSSSydney
1:31:06William Byrd on "The Most Beautiful Program Ever Written" [PWL NYC]
PapersWeLove
59:34CppCon 2017: Matt Kulukundis “Designing a Fast, Efficient, Cache-friendly Hash Table, Step by Step”
CppCon
42:30RustConf 2018 - Closing Keynote - Using Rust For Game Development by Catherine West
Rust Programming Language
1:19:52CppCon 2016: Jason Turner “Rich Code for Tiny Computers: A Simple Commodore 64 Game in C++17”
CppCon
57:38Clasp: Common Lisp using LLVM and C++ for Molecular Metaprogramming
Google TechTalks
3 comments from Hacker News
> Passing strings into a templates ... wouldn't work in C++ ... [VIDEO] Here's an example of parsing regular expressions in C++ at compile time. Code here: [LINK]
One of the stated benefits is that the compiler optimizer can optimize the regex state machine that gets created, resulting in significantly faster match times at runtime. There are some benchmarks if you look up her cppcon talk about the library iirc. Edit: here is her talk, at 39 minutes she shares the benchmarks. [VIDEO]
FYI: This is a C++ template version of compile time regex class. A 54:47 presentation at CppCon 2018 is worth more than a thousand words... see [VIDEO] followup CppCon 2019 video at [LINK] As the above github repo mentions, more info at [LINK]