Collaborative Collection of C++ Best Practices. This online resource is part of Jason Turner's collection of C++ Best Practices resources. See README.md for more information.
Other
8.13k
stars
885
forks
source link
Consider adding Compiler Explorer links to Considering Performance chapter #85
The code size difference for the ternary operator and self-calling lambda examples isn't nearly as big if you compile with C++11 or C++14. The "bad" code size only explodes with C++17 for some reason.
A counter point to the
std::bind
section seems to prove there isn't a runtime overhead for the example given: https://godbolt.org/g/ZcUgRr