A Journey Into Non-Virtual Polymorphism
Rud Merriam | A Journey into Non-Virtual Polymorphism 2 Who Doesn’t Recognize This?? 1990 Borland Turbo C++Cppcon 2023 | Rud Merriam | A Journey into Non-Virtual Polymorphism 3 Background ● Experience – Medium.com (https://medium.com/@rudmerriam)Cppcon 2023 | Rud Merriam | A Journey into Non-Virtual Polymorphism 4 Polymorphism ● Greek: “many forms” (Obligatory statement) ● The use of a single variableCppcon 2023 | Rud Merriam | A Journey into Non-Virtual Polymorphism 5 Polymorphic Variables ● Base class pointer to derived class – Virtual functions are not bad! ● Standard Template Library0 码力 | 43 页 | 536.84 KB | 5 月前3Optimizing Away Virtual Functions May Be Pointless
carePhoto by Tech Nick on unsplashSimple benchmark class Base { public: int concrete() const; virtual int virt() const; }; void benchmark(Base *b, size_t num_iterations) { auto start = Clock::now(); virt_duration = end-start;There are interesting technical details and surprising conclusions that virtual functions can be actually faster. Since CPU architectures are mentioned, I'd expect to see deep nt-vs-inheritance-vs-other- ways-performanceDoes it even matter?Conclusions ● The notion that “virtual functions are slower” is flat out wrong. ○ Which is not to say they are faster ○ Some of the suggested0 码力 | 20 页 | 1.19 MB | 5 月前32.1.4 PingCAP Go runtime related problems in TiDB production environment
Go runtime related problems in TiDB production environment About me ● Arthur Mao(毛康力), Senior Engineer@PingCAP ● TiDB core developer (top3 contributor) ● GitBook about golang internals (@tiancaiamao) Memory ● OS ○ Virtual memory ■ each process has its virtual address space ○ Physical memory ■ OS divides physical memory into pages ○ memory mapping ■ page fault, built the virtual-physical mapping talking about when we talk about Memory ● TLB (translation lookaside buffer) ○ A CPU cache for virtual memory to physical addresses mapping ○ Size limited, when cache miss the memory access become slower0 码力 | 56 页 | 50.15 MB | 5 月前3BehaviorTree.CPP: Task Planning for Robots and Virtual Agents
name, const NodeConfig& config) : SyncActionNode(name, config) {} // You must override this virtual function NodeStatus tick() override { std::cout << "Type: [ApproachEnemy]. Instance:" <<0 码力 | 59 页 | 7.97 MB | 5 月前3Oracle VM VirtualBox 4.2.32 Programming Guide and Reference
. . 20 1.4.2 Authenticating at web service logon . . . . . . . . . . . . . . . . . . . . 21 2 Environment-specific notes 23 2.1 Using the object-oriented web service (OOWS) . . . . . . . . . . . . . . Changing machine settings. Sessions . . . . . . . . . . . . . . . . . . . . . . . . 39 3.3 Launching virtual machines . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40 3.4 VirtualBox events . . . . . . . . . . . . . . . . . . . . 314 15 Contents 7 Host-Guest Communication Manager 315 7.1 Virtual hardware implementation . . . . . . . . . . . . . . . . . . . . . . . . . . 315 7.2 Protocol specification0 码力 | 339 页 | 2.07 MB | 6 月前3Oracle VM VirtualBox 4.3.36 Programming Guide and Reference
. . 22 1.4.2 Authenticating at web service logon . . . . . . . . . . . . . . . . . . . . 23 2 Environment-specific notes 25 2.1 Using the object-oriented web service (OOWS) . . . . . . . . . . . . . . Changing machine settings. Sessions . . . . . . . . . . . . . . . . . . . . . . . . 45 3.3 Launching virtual machines . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46 3.4 VirtualBox events . . . . . . . . . . . . . . . . . . . . . . . . . . 350 7 Host-Guest Communication Manager 351 7.1 Virtual hardware implementation . . . . . . . . . . . . . . . . . . . . . . . . . . 351 7.2 Protocol specification0 码力 | 376 页 | 1.99 MB | 6 月前3Oracle VM VirtualBox 4.3.12 Programming Guide and Reference
. . 22 1.4.2 Authenticating at web service logon . . . . . . . . . . . . . . . . . . . . 23 2 Environment-specific notes 25 2.1 Using the object-oriented web service (OOWS) . . . . . . . . . . . . . . Changing machine settings. Sessions . . . . . . . . . . . . . . . . . . . . . . . . 45 3.3 Launching virtual machines . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46 3.4 VirtualBox events . . . . . . . . . . . . . . . . . . . . . . . . . . 350 7 Host-Guest Communication Manager 351 7.1 Virtual hardware implementation . . . . . . . . . . . . . . . . . . . . . . . . . . 351 7.2 Protocol specification0 码力 | 376 页 | 2.24 MB | 6 月前3Oracle VM VirtualBox 5.2.40 Programming Guide and Reference
. . 24 1.4.2 Authenticating at web service logon . . . . . . . . . . . . . . . . . . . . 25 2 Environment-specific notes 27 2.1 Using the object-oriented web service (OOWS) . . . . . . . . . . . . . . Changing machine settings: Sessions . . . . . . . . . . . . . . . . . . . . . . . . 47 3.3 Launching virtual machines . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48 3.4 VirtualBox events . . . . . . . . . . . . . . . . . . . . 390 19 Contents 7 Host-Guest Communication Manager 391 7.1 Virtual hardware implementation . . . . . . . . . . . . . . . . . . . . . . . . . . 391 7.2 Protocol specification0 码力 | 422 页 | 2.45 MB | 6 月前3Oracle VM VirtualBox 5.2.12 Programming Guide and Reference
. . 24 1.4.2 Authenticating at web service logon . . . . . . . . . . . . . . . . . . . . 25 2 Environment-specific notes 27 2.1 Using the object-oriented web service (OOWS) . . . . . . . . . . . . . . Changing machine settings: Sessions . . . . . . . . . . . . . . . . . . . . . . . . 47 3.3 Launching virtual machines . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48 3.4 VirtualBox events . . . . . . . . . . . . . . . . . . . . . . . . . . 389 7 Host-Guest Communication Manager 390 7.1 Virtual hardware implementation . . . . . . . . . . . . . . . . . . . . . . . . . . 390 7.2 Protocol specification0 码力 | 421 页 | 2.43 MB | 6 月前3Oracle VM VirtualBox 4.1.40 Programming Guide and Reference
. . 19 1.4.2 Authenticating at web service logon . . . . . . . . . . . . . . . . . . . . 20 2 Environment-specific notes 22 2.1 Using the object-oriented web service (OOWS) . . . . . . . . . . . . . . Changing machine settings. Sessions . . . . . . . . . . . . . . . . . . . . . . . . 39 3.3 Launching virtual machines . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40 3.4 VirtualBox events . . . . . . . . . . . . . . . . . . . . . . . . . . 284 7 Host-Guest Communication Manager 285 7.1 Virtual hardware implementation . . . . . . . . . . . . . . . . . . . . . . . . . . 285 7.2 Protocol specification0 码力 | 306 页 | 1.92 MB | 6 月前3
共 212 条
- 1
- 2
- 3
- 4
- 5
- 6
- 22