A Journey Into Non-Virtual PolymorphismRud 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 | 6 月前3
Optimizing Away Virtual Functions May Be PointlesscarePhoto 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 | 6 月前3
BehaviorTree.CPP: Task Planning for Robots and Virtual AgentsHierarchical State Machines The graphical representation of the nodes in a BT has a meaning. Children are ordered from left to right.Are Behavior Trees better than Hierarchical State Machines? HSM BT BT.CPPState CPPState Machines Behavior Trees Learning curve more familiar it needs some practice Concurrency no yes Scalability poor better Readability scales very poorly better Behavior Trees VS Hierarchical Hierarchical State Machines"Tick" and Node types ● The “tick” is the signal that we propagate from the root to the leaves. ● The leaves of the tree are the Actions. I.e. the user-defined code that should be0 码力 | 59 页 | 7.97 MB | 6 月前3
Conan 1.20 Documentationvariables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 126 10.5 Virtual Environments . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Note: If you are working in a team, you probably want to use the same remotes everywhere: developer machines, CI. The conan config install command can automatically define the remotes in a Conan client, as for all Operating Systems, platforms and targets. There are different approaches: 8.1.1 Using virtual environments We can create a package that contains an executable, for example from the default package0 码力 | 611 页 | 4.89 MB | 1 年前3
Just-in-Time Compilation - J F Bastien - CppCon 2020more portable. Assuming a machine- independent representation, such as high-level source code or virtual machine code, only the interpreter need be supplied to run the program on a different machine. more portable. Assuming a machine- independent representation, such as high-level source code or virtual machine code, only the interpreter need be supplied to run the program on a different machine. more portable. Assuming a machine- independent representation, such as high-level source code or virtual machine code, only the interpreter need be supplied to run the program on a different machine.0 码力 | 111 页 | 3.98 MB | 6 月前3
Conan 1.19 Documentationvariables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 126 10.5 Virtual Environments . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Note: If you are working in a team, you probably want to use the same remotes everywhere: developer machines, CI. The conan config install command can automatically define the remotes in a Conan client, as for all Operating Systems, platforms and targets. There are different approaches: 8.1.1 Using virtual environments We can create a package that contains an executable, for example from the default package0 码力 | 609 页 | 4.88 MB | 1 年前3
Conan 1.22 Documentationvariables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 128 10.5 Virtual Environments . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . edition of JFrog Artifactory for Conan packages, including a WebUI, multiple auth protocols (LDAP), Virtual and Remote repositories to create advanced topologies, a Rest API and generic repositories to host Note: If you are working in a team, you probably want to use the same remotes everywhere: developer machines, CI. The conan config install command can automatically define the remotes in a Conan client, as0 码力 | 629 页 | 4.98 MB | 1 年前3
Conan 1.23 Documentationvariables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 128 10.5 Virtual Environments . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . edition of JFrog Artifactory for Conan packages, including a WebUI, multiple auth protocols (LDAP), Virtual and Remote repositories to create advanced topologies, a Rest API and generic repositories to host Note: If you are working in a team, you probably want to use the same remotes everywhere: developer machines, CI. The conan config install command can automatically define the remotes in a Conan client, as0 码力 | 637 页 | 5.04 MB | 1 年前3
Conan 1.24 Documentationvariables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 128 10.5 Virtual Environments . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . edition of JFrog Artifactory for Conan packages, including a WebUI, multiple auth protocols (LDAP), Virtual and Remote repositories to create advanced topologies, a Rest API and generic repositories to host Note: If you are working in a team, you probably want to use the same remotes everywhere: developer machines, CI. The conan config install command can automatically define the remotes in a Conan client, as0 码力 | 647 页 | 5.31 MB | 1 年前3
Conan 1.25 Documentationvariables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 132 10.5 Virtual Environments . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . edition of JFrog Artifactory for Conan packages, including a WebUI, multiple auth protocols (LDAP), Virtual and Remote repositories to create advanced topologies, a Rest API and generic repositories to host Note: If you are working in a team, you probably want to use the same remotes everywhere: developer machines, CI. The conan config install command can automatically define the remotes in a Conan client, as0 码力 | 655 页 | 5.45 MB | 1 年前3
共 188 条
- 1
- 2
- 3
- 4
- 5
- 6
- 19













