Click here to Skip to main content Click here to Skip to main
content  Delegates: C++11 vs. Impossibly Fast - A Quick and
Dirty Comparison  By , 4 Jul 2013 Sign Up to vote Add a reason
or comment to your vote: x Votes of 3 or less require a comment
The following is for you who are curious about how Sergey
Ryazanov's Impossibly Fast C++ Delegates compares to a C++11
lambda/function pointer approach. This is not meant to put one
down, nor is it even close to comprehensive, which is why 'quick
and dirty' is included in the title.  As a background my Windows
API wrapper incorporated Ryazanov's delegates to implement the
member function callbacks. My curiosity got the better of me,
and I wanted to play around with the new C++11 lambda functions
and see how delegates created with them compared to the existing
approach in both usage and performance.   In order to create a
usable callback in DWinLib 3.01 it had to have a function
signature of:  void
DwlWinObjectDerivedClass::someFunction(DwlWinObject *
usableObject