[Script Info] Title: [Events] Format: Layer, Start, End, Style, Name, MarginL, MarginR, MarginV, Effect, Text Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,So Hi there, everyone. Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,My name is Chandler Carruth. Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,I work for Google Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,I work on our C++ language platform Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,I work on our C++ compilers Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,specifically the Clang and ? Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,And I'm here to talk to you a little about performance. Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,and efficiency, and making code fast, Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,and all the different things that go into that. Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,But before I do too much Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,I want to give actually give you guys a little bit of a Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,one might say are expectations. Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,Because I have been reading the twitter feed Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,from all these folks, that talk about all these crazy good questions Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,I just want you guys to essentially know this is my view Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,of what Performance 101 should be. Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,Okay? This is going to be kind of an intro talk. Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,You guys are hard core, really deep performance nuts. Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,You may be a little bit bored, and please be kind, Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,because I'm going to gloss over some things Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,you could go into thoroughly if you really want to Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,We're going to talk about efficiency, performance, Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,algorithms and data structures. Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,And the first thing we are going to do is we're not going to talk about them. Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,We're going to talk about why anyone cares about them. Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,How many folks here think it's really important to have high performance in C++? Like certain that it's super important? Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,Everyone thinks it's important! Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,And the folks here have a really clear idea why performance is important. Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,Now, all the people who didn't raise their hands the second time, Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,Please reconsider raising your hand the first time. Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,We actually need to understand why performance is important in C++, Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,before we actually decide it's important, we're going to care a lot about it. Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,I'm going to tell you why I care about performance in C++. Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,Most of it comes down to a quote from Nicolas Werth. Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,Which I will try to pronounce correctly but fail miserably. Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,I actually really like a lot of our stuff, Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,I think he really encapsulates a lot of my thoughts about the philosophy of software here. Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,The software is getting slower more rapidly than (1:58) Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,But that's what happened Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,We now have to care about Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,And we essentially Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,You have to choose one Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,We're going to choose small Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,The other problem Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,What do we do about the battery Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,How many folks here have charged their phone today Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,That's a problem. Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,That's not a feature, that's a bug. Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,How many Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,We've entered Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,Power became relevant Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,Power efficient instructions Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,Optimizing for power usage Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,Because this is mostly total junk science. Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,Here is the number one Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,Finish running the program Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,The faster your software runs, the lest Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,If I run Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,But it's not, okay? Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,Here's the thing. Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,We've only Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,We figured out how to turn them off. Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,if you have a Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,the way it conserves power is by turning itself off Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,The more Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,So we actually want to make code faster Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,There are some extreme exceptions to it Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,But 99.999999% of the time Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,But batteries aren't the only Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,You'll note that Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,The only thing it is doing is taking electricity and turning it into heat. Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,That is it's job Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,And unfortunately, electricity costs a lot of money Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,And so power becomes very, very important Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,And I find it interesting