Comment

Comment by throwaway2037

What is the Real World impact of a change like this? From the sample code, the person is building some kind of GUI with widgets. How many extra assembly instructions are performed as a result of this particular push_back vs emplace? In my experience with C++ and Qt, the amount of execution time spent building the GUI trivial compared to the paint (or business logic).

The amount of time spent on these trivial issues in C++ never ceases to amaze me about the "C++ crowd". How many more "C++: Back to the basics" talks do we have to sit through? I await the C++ programmers whom will quickly reply to this post: "But, performance!"

That said, this author has appeared many times before on HN. He is an excellent writer.

Discussion

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton