[Day 21] - C Compiler Optimization Fundamentals (and brief performance experiment)
Mike Shah
0:00 / 0:00
[Day 21] - C Compiler Optimization Fundamentals (and brief performance experiment)
5 415 просмотров · 3 г. назад
Mike Shah
42,3 тыс. подписчиков
5 415 просмотров · 3 г. назад
►C Programming playlist: • C Programming Series
►Find full courses on: https://courses.mshah.io/
►Join as member to get perks: / @mikeshah
►Lesson Description: In this lesson we are going to discuss compiler optimizations and what the compiler can do for you. This
is a relatively deep subject, and I want to merely expose you to a few popular compiler optimizations tha
t most compilers support. It's also useful to know about compiler optimizations and how they effect the '
debugability' of your code when they are on. Finally, I'll do a very brief performance experiment, though
this is probably best served with an actual profiler to see where we spend time in our code.
00:00 Introduction
00:50 Optimization levels
04:44 Example optimizations
05:10 Function Inlining
07:30 Constant Folding
08:09 Dead Code Elimination
08:34 Compiler Explorer i.e. Godbolt.org
12:40 Loop Unrolling
16:20 Strength Reduction
18:00 Brief Performance Experiment with 'time'
24:13 Conclusion
►Please like and subscribe to help the channel!
►YouTube Channel: / mikeshah
►Join our free community: https://courses.mshah.io/communities/...