3 ms·
It's unclear what you mean here. Lots of uses of vtables will use offsets to look up a specific slot in a vtable, but the total space used by vtables in most sy
by vidarh 7y ago
It's unclear what you mean here. Lots of uses of vtables will use offsets to look up a specific slot in a vtable, but the total space used by vtables in most systems will be a tiny proportion of the heap, so storing the pointers in the vtables as offsets doesn't seem likely to make much difference.
- ndesaulniers 7y agoWhat's in those slots? (Full pointers) https://itanium-cxx-abi.github.io/cxx-abi/cxx-vtable-ex.html https://itanium-cxx-abi.github.io/cxx-abi/cxx-vtable-ex.html https://bugs.llvm.org/show_bug.cgi?id=26723 https://bugs.llvm.org/show_bug.cgi?id=26723
- vidarh 7y agoYes, but there's only 1 vtable per class. While the latter shows a shockingly high reduction in code size, which seems to imply a ludicrous number of tiny classes with few call sites per method in use in the Chromium code base, relative to what I've seen when doing compiler development, it shouldn't translate into much of a change in heap usage. From reading those, my main takeaway is that the Chromium codebase sounds awful.