On 08/07/2012 03:28 PM, Caolán McNamara wrote:
Btw, isn't there some issue that dynamic_cast/typeinfo stuff is quite
slow under msvc or some such ?, i.e. no biggy for the "occasional" cast,
but a potential problem for say, mass converting the ISA uses in the sw
layout code.

Indeed, dynamic_cast used to be rather expensive for mass use even with GCC at least a couple years back, IIRC. That's why configmgr uses switch(node->kind()) instead of dynamic_cast to dispatch on the different Node subtypes. (And such dispatching IMO makes for cleaner code there than using virtual functions, keeping coherent functionality together. Sometimes you want an "algebraic data type plus functions pattern-matching over it" approach in OO languages, too.)

Stephan
_______________________________________________
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice

Reply via email to