There seems to be a widely held belief among programmers today that efficiency no longer matters in most situations because processors are so fast and numerous and memory is so large. But from a user’s perspective computers are often slower today than they were 30 years ago despite the enormous increase in measured performance of the hardware. How can this be? If this is true, what are we doing wrong and what can we do about it? Is efficiency an everyday concern for working programmers, or is it only needed for special cases written by specialists?
In this talk we will explore these questions and consider the proposition that, contrary to popular belief, performance almost always matters and pervasive attention to efficiency is essential to ensure good performance. We will examine the efficiency tools modern C++ has to offer and discuss techniques for writing efficient code in an elegant, expressive and natural way. Topics will include tuning vs. optimizing, value semantics vs. reference semantics, unions and variants, move semantics, forwarding, container choice, in-place construction, and container node handling.
EVENT:
C++Now 2018
SPEAKER:
Alan Talbot
PERMISSIONS:
Original video was published with the Creative Commons Attribution license (reuse allowed).
CREDITS:
Original video source:
Additional material for C++ learners:
Murach’s C++ Programming
C++ in One Hour a Day, Sams Teach Yourself (8th Edition)
A Tour of C++ (2nd Edition) (C++ In-Depth Series)
C# Programming Illustrated Guide For Beginners & Intermediates: The Future Is Here! Learning By Doing Approach
Tag: effective c++, c++, performance, fast c++, software development
Xem thêm: https://blogthủthuật.vn/category/review
Nguồn: https://blogthủthuật.vn
13:08 "we don't have sso vector"… Bit we do? It's called basic_string
Holy crap this is the slowest talk I have ever heard, and probably will ever hear.
wtf
Watch this video at 1.5x. Be efficient with your time
18:45 – I would argue that load_numbers as a misdesigned interface. It should take an iterator for where the numbers should go.
"That guy down the hall that never opens his blinds, and has an editor that's green on black."
That cuts way too close to home.
–
set (not to mention unordered_set) has significant speed advantages over vector when dealing with large collections of unique values. vector with sort |> unique |> erase |> shrink_to_fit works better for small collections.
–
I'd love to hear how execution policies effect things.
At least in my code I quite like passing non const references.
I program for robots a lot and quite like a sort of pipeline like:
CollisionObject o;
setPosition(o, x, y, z);
setRotation(o, rx, ry, rz);
addCOToScene(o, c);
sendSceneToRviz(c);
can someone tell me what the && in function(type &¶meter) does?
i tried searching it but i still have no idea
Somebody get that man a glass of water.
this is intense
Perfect talk, thanks a lot!!
At least when I read C I know what the computer is doing.
There's so much syntactic sugar here where subtle differences makes the computer do things very differently.
It's a lot like JavaScript, in that in order to write performant code you need a deeper understanding of what the compiler is doing under-the-hood with what you've written.
Vector class stores it's data contiguously, that should mean that it doesn't have bad locality of reference
Wow this video is very humbling to me. I am a sophomore in college and I've recently learned how to program in c++. I really like it because you can maximize efficiency for your programs. Does anyone have any good references for someone somewhat new to c++ (I have a good grasp on all the basics) relating to maximizing the efficiency of programs? Book, youtube channel, blog, etc
this is the most incomprehensible thing i've ever watched about programming
The most convoluted language ever.
Awesome!
My goal:
Performance: 34%
Efficiency: 40%
Readability: 31%
John Wayne.
This talk has convinced me that sometimes it's worth paying for overhead if it makes it possible to actually understand wtf your code does.
Nice title considering it's such a SLOOW TALK
i wish he would restate questions for us youtube peasants
Previously I thought I understood C++, after watching this video, I realized I actually don't understand C++.
2:22 8 threads != 8 cores you dummy
Can someone summarize all the necessary points?
1.25 speed is perfect