Balancing Efficiency and Flexibility: Cost of Abstractions in Embedded Systemsnon-type template parameter74 Conclusions Zero-cost abstractions Encapsulation Inheritance Dynamic Polymorphism Static Polymorphism Negative-cost abstractions More C++ for the embedded world! Architecture0 码力 | 75 页 | 2.12 MB | 6 月前3
C++ Exceptions for Smaller Firmware(RTTI) Exception Tables Exception Code Nondeterministic Slow Binary Search Frame Unwinding Type Comparison (dynamic_cast) 🤫 ? 🤫 Frame Evaluation Requires Malloc Unbounded Memory UsageBack to Class (RTTI) Exception Tables Exception Code Nondeterministic Slow Binary Search Frame Unwinding Type Comparison (dynamic_cast) 🤫 ? 🤫 Frame Evaluation Requires Malloc Unbounded Memory UsageMost accepted return result.data(); } }🎉 IT WORKS! 🥳 but … 57Barrier #2 Large Binary Sizes 58Size Comparison ‼😱‼ Using Exceptions: text data bss dec hex filename 150008 2016 13280 码力 | 237 页 | 6.74 MB | 6 月前3
Au Unitsget it in your project? 2. What does it cost, in terms of developer experience? 16.2Framework for Choosing 1. Can you get it in your project? 2. What does it cost, in terms of developer experience? 3. 3Full comparison https://aurora-opensource.github.io/au/main/alternatives/ 17Full comparison https://aurora-opensource.github.io/au/main/alternatives/ 1. Can you get it? 17.1Full comparison http 1. Can you get it? 2. What does it cost? 17.2Full comparison https://aurora-opensource.github.io/au/main/alternatives/ 1. Can you get it? 2. What does it cost? 3. “Units library speci�c” features:0 码力 | 191 页 | 22.37 MB | 6 月前3
Techniques to Optimise Multi-threaded Data Building During Game Developmentworld cache Stores static world contents - for quick access - no duplicated effort Beware of memory cost Need to divide the world into regions - process as separate tasks Changing one region should not notesGRID CACHE MAP CHOICE HASHMAP • Lookup • High per-cell cost • Good for small area queries FLATMAP • Lookup • No per-cell memory cost • Good for large area queries O(1) O(log n) 20Choice of FlatMap FlatMap or HashMap depends HashMap Faster O(1) lookup Higher per-cell cost - memory or runtime - depends on hashmap design FlatMap Slower O(logn) lookup No per-cell overhead Easier to gather adjacent0 码力 | 99 页 | 2.40 MB | 6 月前3
Continuous Regression Testing for Safer and Faster Refactoring10,000 + attributes to verify 16,000 + gigabytes of input data19 Aurora Innovation In-Memory Comparison Test is dif�cult to setup Test system is inef�cient to run Test system is not reuseable 50 potential differences against your baseline. Automatic and on-demand comparison Overall insights and summary reports Custom comparison rules36 Aurora Innovation Comparing images and videos Share test regression testing effectively Establishing a culture of safety at scale56 Aurora Innovation Custom comparison rules Language Agnostic Real-Time Feedback 3.8 Actual value Version v5.1 3.9 Previous value0 码力 | 85 页 | 11.66 MB | 6 月前3
Class Layoutmembers in their declared order. 24 Copyright © 2020 by Stephen C. Dewhurst and Daniel Saks Lexical Comparison The implementation compares the data members in the lexical order x, y, and z even if z is physically Copyright © 2020 by Stephen C. Dewhurst and Daniel Saks It’s OK to be Nervous Static assertions don’t cost anything at runtime, so be safe! static_assert(sizeof(special_register) == 4, "special_register must friend bool operator ==(NarrowLand const &lhs, NarrowLand const &rhs); }; Let’s optimize equality comparison: bool operator ==(NarrowLand const &lhs, NarrowLand const &rhs) { return !memcmp(&lhs, &rhs,0 码力 | 51 页 | 461.37 KB | 6 月前3
Back to Basics: Classic 9STLNotation • Complexity refers to the runtime cost of an algorithm • Big-O notation expresses the relative complexity of an algorithm 16 Type Notation Runtime Cost Constant O(1) Independent of number of Single-Pass • The only valid use of the expression *p is on the left side of an assignment statement • Comparison operators are not required – no end of sequence is assumed • Output iterators model an "infinite Steagall Input Iterators – Read Forward, Single-Pass • p == q does not imply ++p == ++q • The comparison operators are provided to check whether an input iterator is equal to the past-the-end iterator0 码力 | 75 页 | 603.36 KB | 6 月前3
Making Games Start Fast: A Story About ConcurrencyWait: 0.2s CPU: 0.2s Wait: 0.1s CPU: 1.3s Wait: 0.0s 2.8 (New) Startup Profile 16Side by Side Comparison 17High CPU Time ◉ Single threaded code ◉ Inefficient algorithms ◉ Branch misprediction, cache supposed to address a race condition on Linux ◉ Could simply be removed now 37Side by Side Comparison 38Thoughts about locks ◉ Locks may make code thread safe, but they also make it thread inefficient bottleneck exists upstream 39Keeping those cores busy Threading Computations 3 40Side by Side Comparison 41Loading graphic assets ◉ Loading of both 2D and 3D assets was single threaded ◉ Huge speedup0 码力 | 76 页 | 2.22 MB | 6 月前3
Reflection Is Not Contemplationtypename[:r:] x = 42; // Same as: int x = 42; typename[:^char:] c = '*'; // Same as: char c = '*';Comparison of Splicing Models •The Spec API: function calls create a “spec” of a type that is spliced • let’s eliminate its disadvantages •Strings opaque/unwieldy? Use token sequences instead of strings • Cost: one added literal kind •Injection risks and dangers? Restrict string expansion • Carefully controlled ^^{ a += ( }; constexpr auto t3 = ^^{ abc { def }; // Error, unpaired brace • Concatenation, comparison, comments etc are token-level, not textual • Eliminates string and preprocessor dirt • Macros0 码力 | 45 页 | 2.45 MB | 6 月前3
C++ in the Developing World, Why it Mattersto make the most of the computing resources available • To have All of the Above at a COMFORTABLE COST Developing • The process of “Growing Closer To” / “Moving Towards” an envisioned, state that is come at quite a significant cost, Meaning that Newer Computer Hardware Costs More, out of Reach for many people. • However, This Technological Improvement, does push down the cost for the “Previous Generations” hardware, energy and connectivity, access to computing must come at a lower cost. Access To Computer Hardware At Lower Cost • One way is that computers come in a differant form, namely budget mobile0 码力 | 8 页 | 177.52 KB | 6 月前3
共 178 条
- 1
- 2
- 3
- 4
- 5
- 6
- 18
相关搜索词
BalancingEfficiencyandFlexibilityCostofAbstractionsinEmbeddedSystemsC++ExceptionsforSmallerFirmwareAuUnitsTechniquestoOptimiseMultithreadedDataBuildingDuringGameDevelopmentContinuousRegressionTestingSaferFasterRefactoringClassLayoutBackBasicsClassic9STLMakingGamesStartFastStoryAboutConcurrencyReflectionIsNotContemplationtheDevelopingWorldWhyitMatters













