cpp-best-practices / cppbestpractices

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

Open samkellett opened 6 years ago

samkellett commented 6 years ago

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

samkellett commented 6 years ago
jonvmey commented 5 years ago

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.