Skills and techniques for fast and efficient C++ code.
- Loop Unrolling - a technique to improve performance by reducing loop overhead.
- False Sharing - a performance issue that occurs when multiple threads modify variables that reside on the same cache line.
- OpenMP - an API that supports shared memory multiprocessing, enabling programmers to easily develop multi-threaded applications for parallel computing.
- std::async - a high-level interface for managing asynchronous tasks supported by the C++ Standard Library.
- Spatial Locality - a principle that states that if a program accesses a memory location, it is likely to access nearby memory locations in the near future.
- Temporal Locality - a principle that states that if a program accesses a memory location, it is likely to access the same memory location in the near future.
- C++ compiler with C++20 support
git clone https://github.com/BayernMuller/cpp-optimization
cd cpp-optimization/techniques
./run.sh <example>
- Contributions are welcome! For bug reports, feature requests, or questions, please submit an issue.
- optimization.cpp is using the Microsoft code style. Please follow this style when contributing.
- Please add the below command to .git/hooks/pre-commit to run clang-format before committing.
clang-format -i -style=microsoft $(git diff --cached --name-only --diff-filter=ACM | grep -E '\.(cpp|hpp|c|h)$')
This project is licensed under the MIT License - see the LICENSE file for details.