Back To Basics Lifetime Management
0 码力 | 66 页 | 8.43 MB | 5 月前3Libraries: A First Step Toward Standard C++ Dependency Management
1October 3, 2023 2 Libraries: A First Step Toward Standard C++ Dependency Management Bret Brown, C++ Infrastructure Lead, Bloomberg Bill Hoffman, CTO, KitwareHello! Welcome! Bret Brown C++ Infrastructure portable as the code they contain! ● ✓ Projects should be “cattle,” not “pets”! 7Why dependency management? 8Consensus: Managing dependencies == way too hard Q: Which of these do you find frustrating names: jsonlogConfig.cmake Jsonlog-config.cmake # ... CMake gives you some dependency management tips here ... 13 Aside: Coloring and bolding added for emphasisMotivation: What would we design0 码力 | 82 页 | 4.21 MB | 5 月前3Just-in-Time Compilation - J F Bastien - CppCon 2020
In this talk I'll tell you about C++ AoT compiler, JiTs for dynamic language, JiTs for binary translation, and dive back 20, 30, 40, 50, 60 years, way back into compiler history and read wonderful academic “just-in-time” compilation (JiT) techniques since the 1960s. Broadly, JiT compilation includes any translation performed dynamically, after a program has started execution. We examine the motivation behind “just-in-time” compilation (JiT) techniques since the 1960s. Broadly, JiT compilation includes any translation performed dynamically, after a program has started execution. We examine the motivation behind0 码力 | 111 页 | 3.98 MB | 5 月前3Spanny 2: Rise of std::mdspan
mapping(extents_type parent_shape, extents_type shape, coordinate_t translation, double theta) {... 57 non-default constructorgithub.com/griswaldbrooks/spanny2 mapping(extents_type parent_shape, extents_type shape, coordinate_t translation, double theta) {... 58 non-default constructorgithub.com/griswaldbrooks/spanny2 layout_rotatable { struct mapping { private: extents_type shape_; coordinate_t translation_; double theta_; extents_type parent_shape_; size_type span_size_; }; }; 600 码力 | 117 页 | 2.02 MB | 5 月前3Why is my Build so Slow
longest to compile - Expensive headers (with include chains!) - Support for incremental builds 40Translation Units 41 // templates.hpp #includetemplate struct Sum { static const value = 0; };Translation Units 42 #include “templates.hpp” Sum<8192>::valueTranslation Units 43 ≈1.91 secondsTranslation Units 44 - #include and template costs are per translation unit - #pragma Faster 48 890ms 1089msBut… 49 1089msFree House for You, Jim! 50 1089ms 1137msPoor Dependency Management - Builds should be purely functional - Single-core and parallel builds should just work - Avoid 0 码力 | 71 页 | 3.96 MB | 5 月前3Performance Engineering: Being Friendly to Your Hardware
interconnect • L1 cache implements an address translation boundary • Everything beyond L1 uses platform physical address space • Address translation is not cheapExample - branching 61 uint32_t fn(uint32_t Kcm+0x10> 24: c3 ret Hash function implementation in a separate translation unit.Example - hashing 99 00000000000012a0 <_Z4hash_intP2kv>: 12a0: b9 c5 9d 1c 81 *)&kv->key3, sizeof(kv->key3)); return fnv1a_hash; } Hash function implementation in the same translation unit.Example - hashing 100 0000000000001310 <_Z11hash_packedP2kv>: 1310: 48 89 7c 24 f80 码力 | 111 页 | 2.23 MB | 5 月前3Code Analysis++
Robustness Orthogonality SW helps solving problems The Last Spike Languages Memory management Expressive code Simplicity Work as intended Documented ReviewsReliability Efficiency ● Lifetimes in 2021.2 PVS-Studio: ● Value Range AnalysisData Flow Analysis: CTU – Cross Translation Unit (CTU) Analysis: https://clang.llvm.org/docs/analyzer/user-docs/CrossTranslationUnit.html microsoft.com/cppblog/lifetime-profile-update-in-visual-studio-2019- preview-2/) 7. [Cross Translation Unit (CTU) Analysis](https://clang.llvm.org/docs/analyzer/user-docs/ CrossTranslationUnit.html)0 码力 | 61 页 | 2.70 MB | 5 月前3Things Happening in SG14
concurrent computing • Compile-time Evaluated Thread-Safety • Allow enforcing Rust-inspired resource management in order to help validation non-thread-safe operations at compile-time • There seems to be prior templates a lot more palatable • Get us rid of the infamous Unity builds which break the concept of a translation unit but are ubiquitous in large game codebases to get reasonable compilation speeds • SG140 码力 | 148 页 | 1009.97 KB | 5 月前3Conan 1.56 Documentation
manager . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 1.3 Binary management . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4 1.4 All accelerating the development and Continuous Integration of C and C++ projects. With full binary management, it can create and reuse any number of different binaries (for different config- urations like contributes packages for popular open-source libraries like Boost, Zlib, OpenSSL, Poco, etc. 1.3 Binary management One of the most powerful features of Conan is that it can create and manage pre-compiled binaries0 码力 | 963 页 | 7.67 MB | 1 年前3Conan 1.54 Documentation
manager . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 1.3 Binary management . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4 1.4 All accelerating the development and Continuous Integration of C and C++ projects. With full binary management, it can create and reuse any number of different binaries (for different config- urations like contributes packages for popular open-source libraries like Boost, Zlib, OpenSSL, Poco, etc. 1.3 Binary management One of the most powerful features of Conan is that it can create and manage pre-compiled binaries0 码力 | 953 页 | 7.65 MB | 1 年前3
共 172 条
- 1
- 2
- 3
- 4
- 5
- 6
- 18