~/talk

Nth Pack Element in C++ - A Case Study

Talkat CppCon 2022 · 2022-09-11..09-16· [typescript]
links:none on file
slides:none on file

Compares concrete implementations for grabbing the nth element of a variadic pack, builds and runs benchmarks with metabench and Compiler Explorer, and measures compilation times across GCC, Clang, Circle and languages like Rust, Nim and D. Finds recursion is slow, library solutions like mp11 performs well, Clang’s type_element intrinsic and preprocessor tricks help, and Circle (and the proposed language feature) flattens compile time — benchmarks show huge, surprising gaps and practical tradeoffs.

AI-written summary · about

  1. 0:00Introduction and goals
  2. 1:55Motivation and use cases
  3. 2:39Current state and limitations
  4. 4:46First and last elements
  5. 6:30Structured bindings proposal
  6. 7:45The Nth element challenge
  7. 9:45Overview of solutions
  8. 11:11List of technical approaches
  9. 13:05Using std::array
  10. 15:16Recursion techniques
  11. 17:29Immediate invocations
  12. 19:27Dark magic approaches
  13. 22:31Using Boost.MP11
  14. 25:15Preprocessor solution
  15. 28:51Inheritance-based approach
  16. 30:53Compiler intrinsics
  17. 32:28The Circle compiler
  18. 34:07Future proposals
  19. 35:49Tuple implementation details
  20. 37:30Lambda-based tuples
  21. 39:23Integral constants in tuples
  22. 42:11Compile-time ranges
  23. 44:12Benchmarking methodology
  24. 46:18Benchmark results: GCC and Clang
  25. 49:48Benchmark results: Circle
  26. 51:46Tuple benchmarking analysis
  27. 53:36Language comparison
  28. 55:13Conclusion and future outlook
~/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.