Understanding Compiler Optimization - Chandler Carruth - Opening Keynote Meeting C++ 2015

preview_player
Показать описание
Understanding Compiler Optimization
Chandler Carruth
Opening Keynote Meeting C++ 2015

Рекомендации по теме
Комментарии
Автор

0:00: C++ performance based on compiler optimization
6:10: high level parts of compiler
9:10: LLVM's IR example, simple routine
10:22: LLVM's IR example, modelling data control flow
16:38: optimizer duties, cleanup
18:56: optimizer duties, canonicalization
22:26: optimizer duties, collapse abstractions
23:40: 3 key abstractions (function calls, memory, loops)
25:48: function calls abstraction, inlining
27:40: function calls abstraction, call graph
36:18: function calls abstraction, variadic functions
40:28: memory abstraction
44:20: memory abstraction (partitioning, isolating, other)
50:51: loop abstraction
54:30: loop abstraction, canonicalization
58:50: loop abstraction, loop unroll
1:04:00: loop abstraction, invariant control flow
1:09:00: loop abstraction, questions from audience
1:30:58: optimizing combined abstractions
1:35:30: const not optimized
1:37:52: conclusion and questions

napat
Автор

Kudos to whatever genius decided to put the dot pattern at the back of the stage, so that any camera motion is distracting at best, and nauseating at worst.

inthegaps
Автор

When he asked the crowd if they are excited about C++ I was totally with him. :D

DatMiluK
Автор

The first suggested video linked to this one is "Don't help the compiler" haha.

nero
Автор

This cellular background makings me dizziness.

KirillShvesov
Автор

1:45:41 "once you have code that is clean on the sanitizers, then you know you have a compiler bug" "If we don't sanitize for it, we aren't going to optimize based on it"
That guarantee makes me feel warm and fuzzy inside.

ihatenumberinemail
Автор

I know this is five years old but looking through this comment section is a bit sad. It’s a pretty good talk.

dkierans
Автор

Chandler dude when someone asks you a question, please stop walking, and surely don't give him your back while walking. Also when there is a question in the public, please repeat the question so everyone knows what you are answering to....It is abc in public talking. Except that, brilliant lecture.

nathasion
Автор

The slides going out of sync made this really hard to follow.

nnicolas
Автор

8 years later this person build carbon language

budiardjo
Автор

This is pretty hard to follow because the slide shown doesn't sync with the slide he's talking about. E.g. around 1:03:00 is pretty bad.

jean-francoiscaron
Автор

Very interesting talk. I am not familiar with fortran so I did not exactly follow what he said at 1:20:59 . As for sanitizers, yes ubsan is cool but it is runtime. This is the type of stuff I want to catch with static analysis.

aaronr.
Автор

I have been wondering, what kind of information we could provide within our source code, for example through annotations, that could help the compiler to optimize better or to allow completely new optimizations? We could add new annotations as we find more useful information for compilers. What kind of information the developer knows of how his code should work that the compiler could use?

juzujuzu
Автор

1:35 "they get ever smaller" he doesn't know

SamualN
Автор

20:40 Doesn't that discard potential branch prediction hint from the programmer who might know if it is going to be more likely for the 'if' condition to be true?

szirsp
Автор

You didn't have to re-upload. Just add the tag "yt:stretch=16:9" to the original video.

nameguy
Автор

Around 8 minutes in, the AST is mentioned, and dismissed as uninteresting for this subject.
Isn't the AST a great place for optimizations?

alexanderwesterstahl
Автор

I had fun learning something new but that's about the extent of it. I would not remember any of the details after a week, except for some key takeaways which could have been like 5 slides. Great talk nonetheless.

User-cvee
Автор

To help dem lost culture in germanies: The Goldilocks principle is derived from a children's story "The Three Bears"
in which a little girl named Goldilocks finds a house owned by three
bears. Each bear has its own preference of food and beds. After testing
all three examples of both items, Goldilocks determines that one of them
is always too much in one extreme (too hot or too large), one is too
much in the opposite extreme (too cold or too small), and one is "just
right".[1]

ochgottnochma
Автор

It sucks that we can't unite and put our collective effort on researching better optimizations, tools and methods that allow those optimizations etc.
How many devices we have that run C/C++ coded kernel and software? If those devices are battery powered, then saving CPU is having even more benefits. All major software and hardware giants should donate to this research, or participate at least somehow.


Interesting question is what is theoretically possible, or what can we know for sure is or isn't possible, if we would have like exabyte of ram and exa instruction per second CPU and couple of days time to wait for the compiler to optimize. Perhaps in the future we compile the production quality version by sending our sources to supercomputer that does the optimization. While this sounds funny right now, there are still lots of thought behind these lines that hold truths. Anyway, bug free coding to you all =)

juzujuzu