|
1 | | -# Documentation Home |
| 1 | +# C++ High Performance Computing Optimization Guide |
2 | 2 |
|
3 | | -This site is the documentation entry for the C++ High Performance Computing Optimization Guide. Start here when you want a reading path, a language-specific guide, or direct access to the example modules. |
| 3 | +> **通过可运行的示例学习现代 C++ 性能工程** — 从构建系统到内存优化、SIMD 向量化、并发编程与性能分析,一站式掌握。 |
| 4 | +> |
| 5 | +> Learn modern C++ performance engineering through runnable examples — covering build systems, memory & cache, SIMD, concurrency, benchmarking, and profiling. |
4 | 6 |
|
5 | | -## Project Positioning |
| 7 | +[](https://github.com/LessUp/cpp-high-performance-guide/actions/workflows/ci.yml) [](https://github.com/LessUp/cpp-high-performance-guide/actions/workflows/pages.yml) [](https://github.com/LessUp/cpp-high-performance-guide/blob/master/LICENSE) |
6 | 8 |
|
7 | | -- Learn modern C++ performance engineering through runnable examples instead of isolated notes. |
8 | | -- Cover the path from build system fundamentals to memory and cache behavior, SIMD, concurrency, benchmarking, and profiling. |
9 | | -- Keep the repository README focused on repository setup while this page focuses on documentation entry points and reading order. |
| 9 | +--- |
10 | 10 |
|
11 | | -## Who This Is For |
| 11 | +## Why This Project / 为什么选这个项目 |
12 | 12 |
|
13 | | -- C++ engineers who want a structured path into performance optimization. |
14 | | -- Students and self-learners comparing optimization techniques with executable examples. |
15 | | -- Maintainers who need profiling, benchmarking, and contribution references. |
| 13 | +- **实战驱动** — 每个优化技术都有可编译、可运行、可度量的示例代码,而非孤立的知识笔记。 |
| 14 | +- **从入门到进阶** — 6 个阶段、5 大模块,覆盖构建系统基础到无锁编程。 |
| 15 | +- **自带基准测试** — 集成 Google Benchmark,每个模块都能量化优化前后的性能差异。 |
| 16 | +- **工业级工程实践** — CMake Presets、Sanitizers(ASan / TSan / UBSan)、CI/CD、FlameGraph 全覆盖。 |
| 17 | +- **双语文档** — 中英文学习路径与性能分析指南同步维护。 |
16 | 18 |
|
17 | | -## Start Here |
| 19 | +## Tech Stack / 技术栈 |
18 | 20 |
|
19 | | -- English readers: [Learning Path](docs/en/learning-path.md) |
20 | | -- 中文读者: [学习路径](docs/zh/learning-path.md) |
21 | | -- Need tooling first: [Profiling Guide](docs/en/profiling-guide.md) and [性能分析指南](docs/zh/profiling-guide.md) |
22 | | -- Need site sync details: [GitBook Sync Guide](docs/en/gitbook-sync.md) and [GitBook 接入指南](docs/zh/gitbook-sync.md) |
| 21 | +| Category | Details | |
| 22 | +| --- | --- | |
| 23 | +| **Language** | C++20 | |
| 24 | +| **Compilers** | GCC 11+, Clang 14+ | |
| 25 | +| **Build** | CMake 3.22+, CMake Presets | |
| 26 | +| **Testing** | Google Test, RapidCheck (property tests) | |
| 27 | +| **Benchmarking** | Google Benchmark | |
| 28 | +| **Profiling** | perf, FlameGraph, Valgrind, Intel VTune | |
| 29 | +| **CI/CD** | GitHub Actions (Build, Sanitizers, Pages) | |
| 30 | +| **Docs** | HonKit → GitHub Pages | |
| 31 | + |
| 32 | +## Quick Start / 快速开始 |
| 33 | + |
| 34 | +```bash |
| 35 | +git clone https://github.com/LessUp/cpp-high-performance-guide.git |
| 36 | +cd cpp-high-performance-guide |
| 37 | + |
| 38 | +cmake --preset=release |
| 39 | +cmake --build build/release |
| 40 | +ctest --preset=release |
| 41 | +``` |
| 42 | + |
| 43 | +## Example Modules / 示例模块总览 |
| 44 | + |
| 45 | +| # | Module | Key Topics | Expected Speedup | |
| 46 | +| --- | --- | --- | --- | |
| 47 | +| 01 | [Modern CMake](examples/01-cmake-modern/README.md) | Target-based CMake, FetchContent, Presets | — | |
| 48 | +| 02 | [Memory & Cache](examples/02-memory-cache/README.md) | AOS vs SOA, False Sharing, Alignment, Prefetch | 2–20x | |
| 49 | +| 03 | [Modern C++](examples/03-modern-cpp/README.md) | constexpr, Move Semantics, Reserve, Ranges | 2–1000x | |
| 50 | +| 04 | [SIMD Vectorization](examples/04-simd-vectorization/README.md) | Auto-vectorize, SSE/AVX2/AVX-512, SIMD Wrapper | 3–16x | |
| 51 | +| 05 | [Concurrency](examples/05-concurrency/README.md) | Atomics, Lock-Free Queue, OpenMP | Linear scaling | |
| 52 | + |
| 53 | +## Who This Is For / 适合谁 |
| 54 | + |
| 55 | +- **C++ 工程师** — 需要结构化的性能优化学习路径 |
| 56 | +- **学生与自学者** — 通过可执行示例对比优化技术 |
| 57 | +- **项目维护者** — 需要性能分析、基准测试与贡献参考 |
23 | 58 |
|
24 | | -## Recommended Reading Paths |
| 59 | +## Start Reading / 开始阅读 |
| 60 | + |
| 61 | +| Goal / 目标 | English | 中文 | |
| 62 | +| --- | --- | --- | |
| 63 | +| **Structured learning** / 系统学习 | [Learning Path](docs/en/learning-path.md) | [学习路径](docs/zh/learning-path.md) | |
| 64 | +| **Find bottlenecks** / 定位瓶颈 | [Profiling Guide](docs/en/profiling-guide.md) | [性能分析指南](docs/zh/profiling-guide.md) | |
| 65 | +| **Contribute** / 参与贡献 | [Contributing](CONTRIBUTING.md) | [参与贡献](CONTRIBUTING.zh.md) | |
| 66 | + |
| 67 | +### Recommended Reading Paths / 推荐阅读路径 |
25 | 68 |
|
26 | 69 | | Goal | Recommended path | |
27 | 70 | | --- | --- | |
28 | | -| First visit | Learning Path -> example modules -> profiling guide | |
29 | | -| Benchmark or hotspot analysis | Profiling Guide -> memory and cache module -> SIMD module | |
30 | | -| Add or extend a module | Contributing guide -> relevant module README -> learning path | |
| 71 | +| First visit / 首次访问 | Learning Path → Example Modules → Profiling Guide | |
| 72 | +| Hotspot analysis / 热点分析 | Profiling Guide → Memory & Cache → SIMD | |
| 73 | +| Add a module / 新增模块 | Contributing → Module README → Learning Path | |
31 | 74 |
|
32 | | -## Core Documents |
| 75 | +## 6-Week Study Plan / 六周学习计划 |
33 | 76 |
|
34 | | -| Topic | English | 中文 | |
35 | | -| --- | --- | --- | |
36 | | -| Learning path | [Learning Path](docs/en/learning-path.md) | [学习路径](docs/zh/learning-path.md) | |
37 | | -| Profiling | [Profiling Guide](docs/en/profiling-guide.md) | [性能分析指南](docs/zh/profiling-guide.md) | |
38 | | -| Site sync | [GitBook Sync Guide](docs/en/gitbook-sync.md) | [GitBook 接入指南](docs/zh/gitbook-sync.md) | |
39 | | -| Contribution | [Contributing](CONTRIBUTING.md) | [参与贡献](CONTRIBUTING.zh.md) | |
40 | | - |
41 | | -## Example Modules |
42 | | - |
43 | | -- [01 - Modern CMake](examples/01-cmake-modern/README.md) |
44 | | -- [02 - Memory & Cache Optimization](examples/02-memory-cache/README.md) |
45 | | -- [03 - Modern C++ Features](examples/03-modern-cpp/README.md) |
46 | | -- [04 - SIMD Vectorization](examples/04-simd-vectorization/README.md) |
47 | | -- [05 - Concurrency](examples/05-concurrency/README.md) |
| 77 | +| Week | Topics | |
| 78 | +| --- | --- | |
| 79 | +| 1 | Modern CMake + AOS vs SOA + Memory Alignment | |
| 80 | +| 2 | False Sharing + Prefetch + constexpr + Move Semantics | |
| 81 | +| 3 | Vector Reserve + Ranges + Auto-Vectorization | |
| 82 | +| 4 | SIMD Intrinsics + SIMD Wrapper | |
| 83 | +| 5 | Atomics + Lock-Free Queue | |
| 84 | +| 6 | OpenMP + Profiling & Benchmarking | |
| 85 | + |
| 86 | +## Project Links / 项目链接 |
| 87 | + |
| 88 | +- **GitHub**: [LessUp/cpp-high-performance-guide](https://github.com/LessUp/cpp-high-performance-guide) |
| 89 | +- **Docs Site**: [lessup.github.io/cpp-high-performance-guide](https://lessup.github.io/cpp-high-performance-guide/) |
| 90 | +- **License**: [MIT](https://github.com/LessUp/cpp-high-performance-guide/blob/master/LICENSE) |
0 commit comments