Polymorphic Task
summary
Implements a polymorphic task template that stores any one-shot callable like std::function but supports moving out payloads (unique_ptr) and uses placement new to choose between inline storage and heap allocation. Design includes a small-object optimization and an added virtualized move operation so move construction works via the concept interface. Prototype uses unique_ptr for large models, invokes via virtual invoke, and benchmarks reveal one extra pointer per invocation in some standard-library implementations which is reported for fixing.
AI-written summary · about
chapters (3)
- 0:00Template in Ten Sean Parent
- 1:32What do you think?
- 6:59Polymorphic Task Template in Ten with Small Object Optimization
related talks
01h 10mstd::function: a deep dive behind the curtain
01h 18mMeta Polymorphism
49mA Journey Into Non-Virtual Polymorphism in C++
01h 01mUsing Modern C++ to Eliminate Virtual Functions
01h 10mstd::function: a deep dive behind the curtain
59mTaming Lambdas' uniqueness
01h 05mExpressing Implementation Sameness and Similarity - Polymorphism in Modern C++
01h 03mMeta Techniques: Heterogeneous Polymorphism & Fast Prototyping at Facebook
