Skip to content
This repository was archived by the owner on Mar 4, 2026. It is now read-only.

Commit 312dcae

Browse files
committed
slides: minor changes + pdf
1 parent 3f84bd8 commit 312dcae

File tree

3 files changed

+13
-6
lines changed

3 files changed

+13
-6
lines changed

docs/slides/YOMM2.pdf

19.7 KB
Binary file not shown.

docs/slides/deck/04-open-methods.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,8 @@ define_method(int, value, (Plus& expr)) {
118118
jmp qword ptr [rax+8*rcx]
119119
```
120120

121-
* 15-30% slower than equivalent native virtual function call (but see `virtual_ptr`)
121+
* 15-30% slower than equivalent native virtual function call (using perfect
122+
integer hash; but see `virtual_ptr`)
122123

123124
* [Optimizing Away C++ Virtual Functions May Be
124125
Pointless](https://www.youtube.com/watch?v=i5MAXAxp_Tw) - Shachar Shemesh -

docs/slides/deck/06-evolution.md

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
<ul>
1313
<li class="fragment">goals:
1414
<ul>
15-
<li class="fragment">help promote adoption in the standard
15+
<li class="fragment">help promote adoption in the language
1616
<ul>
1717
<li class="fragment">submit to Boost</li>
1818
<li class="fragment">talk about it (CppCon 2018...)</li>
@@ -124,13 +124,15 @@ ret
124124
## Core API
125125

126126
```c++
127-
use_classes<Node, Number, Plus, Times> use_ast_classes;
128-
129127
struct value_id;
130128
using value = method<value_id, int(virtual_<const Node&>)>;
129+
```
131130

131+
```c++
132132
auto result = value::fn(expr);
133+
```
133134

135+
```c++
134136
int number_value(const Number& node) {
135137
return node.val;
136138
}
@@ -145,6 +147,8 @@ struct binary_value {
145147

146148
YOMM2_STATIC(value::add_definition<binary_value<Plus, std::plus<int>>>);
147149
YOMM2_STATIC(value::add_definition<binary_value<Times, std::multiplies<int>>>);
150+
151+
YOMM2_STATIC(use_classes<Node, Number, Plus, Times>);
148152
```
149153
150154
@@ -157,10 +161,10 @@ YOMM2_STATIC(value::add_definition<binary_value<Times, std::multiplies<int>>>);
157161
<li>virtual_ptr</li>
158162
<li>core API</li>
159163
<li class="fragment">template interop toolkit</li>
160-
<li class="fragment">header only (+ Compiler Explorer)</li>
164+
<li class="fragment">header only (Compiler Explorer)</li>
161165
<li class="fragment">friendship</li>
162166
<li class="fragment">member methods</li>
163-
<li class="fragment">policies and facets
167+
<li class="fragment">policies and facets (latest release)
164168
<ul>
165169
<li class="fragment">custom RTTI</li>
166170
<li class="fragment">custom error handling, trace, vptr placement...</li>
@@ -180,6 +184,8 @@ YOMM2_STATIC(value::add_definition<binary_value<Times, std::multiplies<int>>>);
180184
<li class="fragment">match (beat?) virtual function speed</li>
181185
<li class="fragment">pre-calculate dispatch tables</li>
182186
<li class="fragment">malloc-free operation</li>
187+
<li class="fragment">dispatch on std::any</li>
188+
<li class="fragment">(feature complete)</li>
183189
<li class="fragment">C++20</li>
184190
</ul>
185191
</li>

0 commit comments

Comments
 (0)