~/talk

Experimenting with type erasure in C++17

Talkat Meeting C++ 2022 · 2022-11-17..11-19· [databases]
links:none on file
slides:none on file

A C++17 SAS7BDAT reader implements external polymorphism via type erasure (template-based models, adapters, value-semantics) plus a pimpl and factory-backed unique_ptr construction. Tests use 170 files (~80 MB) exercising endian, word-size and compression variants. Python and R wrappers work by creating C++ sinks but pay conversion overhead; benchmarks compare favorably to C, python, R and Julia. Practical issues covered: ADL/free-function resolution, testable internal detail namespace, and ownership and end-of-data API fixes.

AI-written summary · about

  1. 0:00Introduction
  2. 1:46Motivation for C++ SAS reader
  3. 3:51Type erasure and external polymorphism
  4. 5:17What is type erasure
  5. 7:43External polymorphism solution
  6. 9:54Type erasure for value semantics
  7. 11:38Data source and sink interfaces
  8. 13:04SAS file decoding challenges
  9. 14:33Formatter with type erasure
  10. 15:36Adding column filters
  11. 16:22Reader construction
  12. 17:49Private implementation (PIMPL)
  13. 19:36Reading SAS metadata
  14. 21:19SAS file structure
  15. 22:21Testing the reader
  16. 25:59Compiler Explorer demo
  17. 27:10Code walkthrough
  18. 30:53Extending to Python and R
  19. 33:22Performance optimizations
  20. 36:10Benchmarking readers
  21. 37:17Lessons learned
  22. 38:22Testing strategies
  23. 39:04Ownership of injected objects
  24. 40:15Q&A
~/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.