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