On Dec 7, 2006, at 5:26 PM, Morgan L wrote:
Virtual functions are more expensive than the "Cheshire Cat"
pattern because they add code bloat to each call-site. To call a
virtual function the compiler must generate extra code to
dereference the object's vtable, whereas with a d-pointer approach
that cost exists only once at the site of the implementation.
Moreover, the d-pointer approach allows cross-platform code to be
more easily shared between the ports. The approach breaks down,
however, when header files are heavily #ifdef'd as they are in much
of WebCore today. It seems to me that there is a happy middle
ground to be had :-)
That sounds right to me.
-- Darin
_______________________________________________
webkit-dev mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo/webkit-dev