This is the note about my tricks to optimize c/c++ program.On the top,the software optimization often follow the path as below:
order | coefficient | |
time | Algorithm | Tricks |
space | Algorithm | Tricks |
So in this book we concern the Optimization Tricks in c/c++ program.
- Memory Padding
- Restrict Modifier
- Inline or Macro Function
- Tail Function Optimization
- Noexcept
- Continuous Memory
- Conditional Branch Prediction
- Bit Operator
- Constexpr
- Emplace API
- Empty Array In Struct
- Function calling
- Auto vectorized