Tracy: A Profiler You Don't Want to MissProfiling Zoo holistic (automatic) issues: information overload; profiling overhead (skew) selective (manual) Sampling callstack snapshot probing system-wide automatic (regular intervals) OS kernel events Profiling Zoo holistic (automatic) issues: information overload; profiling overhead (skew) selective (manual) Sampling callstack snapshot probing system-wide automatic (regular intervals) OS kernel events TracyClient.cpp TracyClient.cpp TracyClient.cpp TracyClient.cpp Behold the Tracy Multiverse! (Tracy Manual, Section 2.1.5)18 Tracy integration across shared libraries tracy (shared library) TracyClient0 码力 | 85 页 | 6.51 MB | 6 月前3
Tracy: A Profiler You Don't Want to MissProfiling Zoo holistic (automatic) issues: information overload; profiling overhead (skew) selective (manual) Sampling callstack snapshot probing system-wide automatic (regular intervals) OS kernel events Profiling Zoo holistic (automatic) issues: information overload; profiling overhead (skew) selective (manual) Sampling callstack snapshot probing system-wide automatic (regular intervals) OS kernel events ZoneScoped; ... } ... { ZoneScoped; ... } }23 Tracy manual, Section 3.1 Tracy Zoning 101 int foo() { ZoneScoped; ... if (!spoon) { Zo0 码力 | 84 页 | 8.70 MB | 6 月前3
Applicative: The Forgotten Functional Patternthought I knew about monads until you just said that, now I'm not so sure… Well, I thought I knew about monads until you just said that, now I'm not so sure… 7OR MAYBE THIS…? OR MAYBE THIS…? Well, I thought thought I knew about monads until you just said that, now I'm not so sure… Well, I thought I knew about monads until you just said that, now I'm not so sure… Don't worry about what a13bind bind IN HASKELL IN HASKELL bind bind is spelt is spelt (>>=) (>>=) (>>=) :: m a -> (a -> m b) -> m b 14fmap fmap + + join join = = bind bind When we try to When we try to fmap fmap 0 码力 | 141 页 | 11.33 MB | 6 月前3
Au Unitslibrary: double distance_m; 1 2 3 4 5 3Units library: basic concept // With units library: Quantitydistance; // No units library: 1 double distance_m; 2 3 4 5 3.1Units library: library: 1 double distance_m; 2 3 4 5 3.2Units library: basic concept // With units library: Quantity distance; // No units library: 1 double distance_m; 2 3 4 5 3.3Aurora InnovationAurora library const double dist_to_goal_m = 30.0; const double speed_mph = 25.0; const double speed_mps = speed_mph * MPS_PER_MPH; const double time_to_goal_s = dist_to_goal_m / speed_mps; 7.1Example: time 0 码力 | 191 页 | 22.37 MB | 6 月前3
Cooperative C++ EvolutionRobert Fry, Artie Fuffkin, Gabriel Gerlero, Jaroslaw Glowacki, Matt Godbolt, William Gooch, Víctor M. González, Terence J. Grant, GrigorenkoPV, Piotr Halas, HALL9kv0, Morten Hattesen, Neil Henderson Henderson, Michael Hermier, h-vetinari, ILoveGoulash, Stefan Isak, Tim Keitt, Vanya Khodor, Hugo Lindström, Ferenc Nandor Janky, jazn, jgarvin, Dominik Kaszewski, kelbon, Marek Knápek, Emilia Kond, Vladimir }; class MyClass : public Base { public: virtual void f() { /*...*/ } // ... }; Compiler for (m : members) if (!v.has_access()) if(is_class()) v.make_private(); else // is_struct()0 码力 | 85 页 | 5.73 MB | 6 月前3
Taming the C++ Filter Viewjosuttis.com 1 C++ Nicolai M. Josuttis josuttis.com @NicoJosuttis Taming the C++ Filter View September 17, 2024 16:45 - 17:45 MDT ©2024 by josuttis.com 2 C++ Nicolai M. Josuttis • Independent consultant of end() end() begin() ++ pos end() begin() filter ++ pos ©2024 by josuttis.com 34 C++ • Manual iteration: 5 6 8 7 0 1 3 4 2 14 9 10 11 12 13 20 21 22 23 15 16 17 18 19 29 24 25 27 28 26 end() pos Nico Josuttis C++ Filter View @cppcon 2024-09-17 19©2024 by josuttis.com 39 C++ • Reverse manual iteration: 5 6 8 7 0 1 3 4 2 14 9 10 11 12 13 20 21 22 23 15 16 17 18 19 29 24 25 27 28 26 end()0 码力 | 43 页 | 2.77 MB | 6 月前3
The Most Important Design Guideline is Testabilityreal question, the idea of immediate compilation and "unit tests" appeals to me only rarely, when I’m feeling my way in a totally unknown environment and need feedback about what works and what doesn’t 77Rewrite; Power Peg Moved, Not Removed 78Did Not Retest Power Peg 79Deploy Version to Support RLP 80Manual Deployment Mistake 81No Review or Test of Deployment 82RLP Goes Live on 7 Servers 83Power Peg Peg in 2003, dead code still around •Refactored code in 2005 ; moved dead code ; test still pass •Manual deployment ; no review ; no tests •Different components had different view of same thing •email0 码力 | 126 页 | 9.11 MB | 6 月前3
Express Your Expectations: A Fast, Compliant JSON Pull Parser for Writing Robust Applicationslibrary to do X is like telling a songwriter there’s already a song about love. Pete Cordell Jonathan Müller — @foonathan Express your expectations CppCon 2023-10-03 1tc::json::parser Extract some JSON members com/think-cell/think-cell-library Jonathan Müller — @foonathan Express your expectations CppCon 2023-10-03 2(JSON) Parser design What is a parser? Jonathan Müller — @foonathan Express your expectations (JSON) Jonathan Müller — @foonathan Express your expectations CppCon 2023-10-03 4Javascript Object Notation (JSON) Idea: Human-readable serialization of Javascript objects. Jonathan Müller — @foonathan0 码力 | 143 页 | 736.91 KB | 6 月前3
Back To Basics: Functional Programming in C++What is functional programming? Jonathan Müller — @foonathan Back to Basics: Functional Programming in C++ CppCon 2024-09-19 1Imperative Programming Definition Specify instructions that manipulate state state in order to achieve a goal. Jonathan Müller — @foonathan Back to Basics: Functional Programming in C++ CppCon 2024-09-19 2Imperative Programming Definition Specify instructions that manipulate manipulate state in order to achieve a goal. C and C++ Jonathan Müller — @foonathan Back to Basics: Functional Programming in C++ CppCon 2024-09-19 2Imperative Programming Definition Specify instructions that0 码力 | 178 页 | 918.67 KB | 6 月前3
Mastering C++ Modulesdyndep https://ninja-build.org/manual.html#ref_dyndep • May 2019 ninja merged all of the changes to support Fortran because of C++ modules! 16https://ninja-build.org/manual.html#ref_dyndep Some use cases ring_view> extract_number(std::string_view s) noexcept { if (auto m = ctre::match<"[a-z]+([0-9]+)">(s)) { return m.get<1>().to_view(); } else { return std::nullopt; } } int hoffman@kitware.com • Read “how to write a CMake buildsystem” – https://cmake.org/cmake/help/latest/manual/cmake-buildsystem.7.html/Explore the CMake documentation • Explore the CMake documentation – https://www0 码力 | 77 页 | 9.07 MB | 6 月前3
共 297 条
- 1
- 2
- 3
- 4
- 5
- 6
- 30













