-
Notifications
You must be signed in to change notification settings - Fork 269
Add build time optimization documentation #3608
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: develop
Are you sure you want to change the base?
Conversation
b057073 to
5de5575
Compare
5de5575 to
52fa8f6
Compare
80c4f97 to
71413bd
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR adds comprehensive documentation on build time optimization techniques for reducing C++ template instantiation overhead in the Composable Kernel codebase. The documentation targets the heavy use of template metaprogramming which can significantly impact compilation times.
Changes:
- Documents four key optimization strategies: pack expansion, named functors, constexpr loops, and fold expressions
- Provides before/after code examples with real metrics from previous optimization efforts
- Explains the computational complexity improvements and their practical impact on build times
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
e814786 to
ad15f55
Compare
ec8e794 to
83a76d7
Compare
This document describes techniques for reducing C++ template instantiation overhead in the Composable Kernel codebase, including: - Replacing recursive templates with pack expansion (O(N) → O(1) depth) - Using named functors instead of lambdas to share instantiations - Replacing template recursion with constexpr loops - Using fold expressions for accumulation operations These techniques can significantly reduce build times for template-heavy code.
ad15f55 to
b63bfd9
Compare
shumway
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks great! Thanks for the work rewriting this, it's really clear and helpful.
Summary
BUILD_TIME_OPTIMIZATION.mddocumenting techniques for reducing C++ template instantiation overheadTracking issue: #3575