Hi,
I am looking at a performance slow-down  introduced after using some 
osg::Switch groups.

I did some performance benchmarking on std::vector<bool> and I found push_backs 
are 10x slower than std::vector<int>, and more importantly, the simple [] 
operator is about 20x slower(*). I am not sure it is the smoking gun yet, as I 
will need to back-track a lot of code, but it looks possible.

This is because std::vector<bool> is specialized in the STL to be a memory 
efficient packed vector.

I am not so sure that the memory (<bool> vs say <unsigned char> ) saved is 
really worth  the performance hit in the case of osg::Switch

(* Win32, _SECURE_SCL=0, Studio 2008)

Andrew

------------------
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=31323#31323





_______________________________________________
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to