[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-optimize
Subject:    Re: qobject_cast
From:       Olivier Goffart <ogoffart () kde ! org>
Date:       2005-11-12 23:36:19
Message-ID: 200511130036.23932.ogoffart () kde ! org
[Download RAW message or body]

[Attachment #2 (multipart/signed)]


Le Dimanche 13 Novembre 2005 00:42, Roger Larsson a écrit :
> On Saturday 12 November 2005 11.18, Olivier Goffart wrote:

> > Of course, I must continue to use static_cast which is still 10 times
> > faster than qobject_cast when i know what my object is.
>
> The question is - how do you know this for sure in real applications.
> (could be true now, but what about early next year)
> A test on a member variable (enum), or?
> How much time would such an test add to the static_cast case?
> (higher optimization levels will probably move that test out of the loop)

Depending the context.

for example, in some case, i'm sure that the sender() of a slot that is only 
connected to one signal of a widget is a QWidget, so in theory, static_cast 
is fine.


[Attachment #5 (application/pgp-signature)]

_______________________________________________
Kde-optimize mailing list
Kde-optimize@kde.org
https://mail.kde.org/mailman/listinfo/kde-optimize


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic