4 ms·
Yes. You're right. It's not the typical C++ vtable. I wrote a second blog for the C++ style vtable. https://williamw520.github.io/2025/07/17/memory-efficient-
by ww520 1y ago
Yes. You're right. It's not the typical C++ vtable.
I wrote a second blog for the C++ style vtable. https://williamw520.github.io/2025/07/17/memory-efficient-zig-interface.html https://williamw520.github.io/2025/07/17/memory-efficient-zi...
The first version is faster (one pointer indirection) with more memory consumed. The second version is more memory efficient sharing a single vtable for all instances, a bit slower (two pointer indirections).