The End of std::endl
summary
Claim: std::endl does a newline plus a flush and that flush can slow heavy output dramatically. Measurements show a simple test of writing 80‑char lines for a million lines gives a factor of six slowdown when using std::endl. Also debunks the myth that endl translates line endings — that happens at file/text mode, not endl. Recommends using std::flush when a flush is intended or rolling a tiny custom manipulator like nl; slides and code live at https://github.com/CppCon/CppCon2017
AI-written summary · about
chapters (6)
- 0:00Start
- 0:36What Does std::endl Do?
- 1:45What's The Difference?
- 2:22Say What You Mean
- 2:45You Like the Manipulator?
- 3:01Summary
related talks
53mWhy Is My C++ Build So Slow? Compilation Profiling and Visualization
51mSimplicity: Not Just for Beginners
40mLessons from two decades of writing bad code
01h 01mBack to Basics: Debugging in Cpp
44mCustomising clang tidy to modernise your legacy C++ code
54mPlain Text
47mAdventures with C++ Legacy Codebases: Tales of Incremental Improvement
56mC++ Code Smells
