Code Size Compiler Optimizations and Techniques for Embedded Systems
summary
Overview of concrete techniques and measured effects: compilers’ code‑size flags (-Os, -Oz), implemented in LLVM optimizations like hot cold splitting and function-entry instrumentation that collect field data, and link-time techniques (thin LTO, identical code folding, machine outliner). Tools used include size, strings and Bloaty and a libstdc++ case where strings reveal dead debug code. Claims include micro reductions from GVNHoist/identical folding (<1%) and larger wins from outlining (reported ~10%), plus practical advice on template instantiation, data‑structure choices, stripping and instrumentation to find unused functions.
AI-written summary · about
chapters (20)
- 0:00Introduction
- 0:28Why Code Size Matters
- 2:09Outline
- 4:16Tools
- 5:08String Tool
- 6:20Popular Optimizations
- 16:17llvm Flags
- 21:03C Library Optimizations
- 23:45Code Refactoring
- 30:40Attributes
- 33:55Data Structures Example
- 38:52C Library Optimization
- 40:13Code Size Reduction Tools
- 42:00Compiler Instrumentation Techniques
- 44:13Compiler Optimizations
- 44:31No Accept with Conditional
- 46:25Optimizations
- 49:37Loop Medium Recognition
- 50:48Resources
- 51:25Questions
related talks
58mOptimization Tips - Mo' Hustle Mo' Problems
01h 05mFast and small C++ - When efficiency matters
01h 37mAn Overview of Program Optimization Techniques
37mC++ as an Optimizing Assembler - a Performance Talk
42mPractical Optimizations
01h 03mFast and Small C++ - When Efficiency Matters
14mMemory Optimization through Structure Packaging
55mTo Make Code Fast, All You Need Is… ☠️
