Moving Faster: Everyday Efficiency in Modern C++
Video Statistics and Information
Channel: Coding Tech
Views: 48,048
Rating: 4.8958707 out of 5
Keywords: c++, performance, fast c++, software development
Id: LFv7XwgsdLY
Channel Id: undefined
Length: 88min 56sec (5336 seconds)
Published: Sun Nov 04 2018
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.
I just wanted to say, that the idea of that C++ flame logo (I guess the thumbnail of the video) is dope.
Good talk, but confused (30:25) why this is this more costly
than this
At 22:53, he says that taking the vector by reference is fully optimal, yet I get better performance using a return type: https://quick-bench.com/q/JIkVuaXAVSrvJulIjfg6-eGLzIQ
In general I think writing clear code using return types is more important than messing up your interface with out parameters, whilst also typically not hurting performance much if at all with modern C++ move semantics.
EDIT: On further inspection, it seems like the improved performance only occurs with Clang using libstdc++. MSVC, GCC and Clang (using libc++) all have identical performance between returning by value and passing by reference (which is what you'd expect).