~/talk

The Power Of Compile-Time Resources

Talkat CppNorth 2022 · 2022-07-18..07-20· [c-and-cpp, compilers-and-language-design]
slides:none on file

A tool converts a known JSON schema into generated C++ files (document.hpp, document_impul.hpp, document.cpp) that emit inline constexpr objects so the schema is embedded as compile-time data; a 9.93 MB schema with 155,990 objects becomes static pointers instead of runtime parsing. Result: binary grows 54→65 MB, RAM drops 218→214 MB, heap allocations 3.0M→2.1M, and runtime falls ~10.18s→10.08s. The pipeline uses nlohmann::json, previously used CBOR, and performs compile-time validation via constexpr exceptions.

AI-written summary · about

  1. 0:00Introduction to compile-time resources
  2. 1:31Background and past talks
  3. 4:21Real-world use case overview
  4. 6:50JSON to C++ conversion tool
  5. 13:33Meetup and constexpr discussion
  6. 20:34What compile-time work looks like
  7. 23:04JSON schema performance results
  8. 31:17Compile-time exceptions and validation
  9. 39:29Embedded device configuration
  10. 45:27Constexpr-compatible data structures
  11. 50:42Minimizing compile-time allocations
  12. 54:20Random number generation at compile time
  13. 55:42Configuration file formats
  14. 56:27Q&A and closing remarks
~/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.