Hi Fabien, On Mon, Mar 8, 2010 at 10:24 AM, Fabien Lavignotte < [email protected]> wrote:
> Ok, i see your point of view. > But to modify the OBJECT_CAST macro is a bit tricky, and the runtime > cost of a dynamic_cast compared to a static_cast is quite negligible in > practise. dyamic_cast<> is surprisingly expensive and can take many hundreds of CPU cycles, and should generally be avoided in code that performance is at all important. I haven't reviewed you suggested changes yet so can't qualify whether in this case is case where it's a potential performance bottleneck. In construction of wrappers dynamic casts won't effect performance, and generally writing isn't as critical as reading performance but it still can be an important aspect to an apps performance. Robert.
_______________________________________________ osg-submissions mailing list [email protected] http://lists.openscenegraph.org/listinfo.cgi/osg-submissions-openscenegraph.org
