Boost logo

Boost :

From: Jonathan Turkanis (technews_at_[hidden])
Date: 2005-01-24 19:20:12


Hi,

 I'm writing documentation for my interface library comparing the performance of
interfaces vs. base classes with virtual functions. I was going cite a reduction
in code bloat caused by virtual functions, with a link to the Boost.Function
docs. But when I read the function docs again I was surprised: I had thought the
bloat was caused by duplicate vtables being placed in different translation
units; I see instead that the bloat cited is attributes to auxiliary
type-classification functions.

In the interface library I construct artificial vtables containing pointers to
free functions, but each table has a slot reserved for a function which allows
the type of the bound object to be partially recovered. Could this extra
function mean that any improvement in code size achieved by eliminating virtual
functions has been canceled out? I realize I haven't given much info about my
library; I can supply more if necessary.

Any insight would be greatly appreciated.

Jonathan


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk