Re: qobject_cast

Olivier Goffart <[email protected]> Sun, 13 Nov 2005 00:39:39 +0100
Newsgroups gmane.comp.kde.devel.optimize
Message-ID <[email protected]>
Le Samedi 12 Novembre 2005 12:48, Dirk Mueller a écrit :
> On Saturday 12 November 2005 11:18, Olivier Goffart wrote:
> > After having doing some test, it seems that qobject_cast is 3 times
> > faster than dynamic_cast.
>
> that heavily depends on the compiler ;) The main difference is that
> qobject_cast more often works accross DSO boundaries, even if LTDL_LOCAL is
> used for dlopen'ing the module.

I don't understand that. I don't even know what LTDL_LOCAL is.

> also, dynamic_cast works in more cases than qobject_cast works (which
> relies on the types inheriting QObject iirc).

yes,  qobject_cast  only work with QObject deviated that have a QMetaObject.
But that's almost the case of all QObject anyway.

_______________________________________________
Kde-optimize mailing list
[email protected]
https://mail.kde.org/mailman/listinfo/kde-optimize
signature.asc (application/pgp-signature, 189 B)
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2 (GNU/Linux)

iD8DBQBDdn0/z58lY8jWrL0RAqPZAJoDQzXaLJx8va5zF5MMTasKG58aMwCeM4ve
R/EdC67C6RGD1dnSwpTthW0=
=NfxW
-----END PGP SIGNATURE-----