Re: [osg-users] Performance of dynamic_cast vs. virtual call

2008-12-03 Thread Sukender
Hi Ulrich, Well of course a dynamic_cast is not always repleacable by a className() call. This happens only sometimes. My bench' only says if you can, then use className() and also says use dynamic_cast wisely: it costs a lot. And about the static_cast in the bench', you're right, but I'm not

Re: [osg-users] Performance of dynamic_cast vs. virtual call

2008-12-03 Thread Robert Osfield
On Wed, Dec 3, 2008 at 9:18 AM, Sukender [EMAIL PROTECTED] wrote: Well of course a dynamic_cast is not always repleacable by a className() call. This happens only sometimes. My bench' only says if you can, then use className() and also says use dynamic_cast wisely: it costs a lot.

Re: [osg-users] Performance of dynamic_cast vs. virtual call

2008-12-03 Thread Sukender
Hi Robert, Thanks for being so precise. Well I knew most of it, but that's always good to remember all of this. :) And to also be precise: I just wanted to benchmark my system, and I had values than outcame my expectations. So I told others about this. Cheers, Sukender PVLE - Lightweight

Re: [osg-users] Performance of dynamic_cast vs. virtual call

2008-12-02 Thread Ulrich Hertlein
Hello Sukender, Quoting Sukender [EMAIL PROTECTED]: Has anyone *benchmarked* the difference between a dynamic_cast and a virtual call to identify the type of a class? Before my benchmark, I guessed the virtual call was cheaper, but how much? I just knew it depends a lot on how types are