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

List:       kde-devel
Subject:    Re: dynamic_cast performance overhead
From:       Michael Buesch <mbuesch () freenet ! de>
Date:       2005-06-03 19:52:18
Message-ID: 200506032152.19089.mbuesch () freenet ! de
[Download RAW message or body]

[Attachment #2 (multipart/signed)]


Quoting Sunil <funtoos@yahoo.com>:
> can you please attach the benchmark? I would compare
> g++ on linux vs. cygwin. It may very well be just a
> cygwin phenonmenon.

I did not write a benchmark.
I modified my existing application and added some
loop and gettimeofday() calls.

If you do a benchmark, you should think about it, before
you give the numbers a value. For example I could imagine
a dynamic_cast to take longer if we have a long
inheritance chain: A derived from B and B from C etc...
Also multiple inheritance per class may increase time.
I don't know how the __dynamic_cast function works
internally, just a thought.

Best should be, if you take existing KDE and time the
dynamic_casts, which you think are the bottlenecks.

> --- Michael Buesch <mbuesch@freenet.de> wrote:
> 
> > I just did a small test with 10000
> > dynamic_cast in a loop. I captured the time with
> > gettimeofday(). The loop always completed in
> > 4000-5000 microseconds.
> > (depending on the other system load. I did not close
> > every app to
> > get a clean benchmark system).
> > So I don't really see a problem with dynamic_cast on
> > Linux/gcc4
> > taking half a microsecond.
> > 
> > This is a 2.8Ghz P4 HT
> > 
> > Maybe you could do such a test on windows?
> > 
> > -- 
> > Greetings, Michael
> > 
> > 
> > 
> 
> 
> __________________________________________________
> Do You Yahoo!?
> Tired of spam?  Yahoo! Mail has the best spam protection around 
> http://mail.yahoo.com 
> 
> 

-- 
Greetings, Michael



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

>> Visit http://mail.kde.org/mailman/listinfo/kde-devel#unsub to unsubscribe <<


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

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