Proxy: Next Generation Polymorphism
summary
Proxy is an open-source header-only C++20 library that replaces inheritance with pointer-based polymorphic wrappers, using GC-like pointer-based lifetime management without a garbage collector. It offers make_proxy / make_proxy_shared, proxy view and weak proxy semantics, and a tiny fmt integration header. Benchmarks claim up to 300% faster on MSVC for small objects versus virtual functions and mixed results on ARM and Apple compilers. The library is deployed in Windows production since 2022 and lives at github.com/microsoft/proxy.
AI-written summary · about
chapters (10)
- 0:00Proxy library intro
- 3:17Motivation for next-gen polymorphism
- 6:10Library overview
- 10:10Benchmarking performance
- 13:02Core Proxy concepts
- 18:03Proxy types defined
- 22:03Creating Proxy objects
- 24:17Dispatch prototypes and macros
- 27:09Proxy 4 features
- 28:57Live demo
related talks
01h 23mRethink Polymorphism in C++
01h 07mDynamic Polymorphism With Code Injection and Metaclasses
01h 16mPolymorphism, Cohesion, and Coupling in C++
58mBetter Code: Runtime Polymorphism
01h 02mFancy Pointers for Fun and Profit
59mMeta++: Language Support for Advanced Generative Programming
01h 01mGetting Allocators out of Our Way
01h 08mC++ Metaprogramming: A Paradigm Shift
