Discussion:
[osg-users] Float vs double in BOUNDINGSPHERE and BOUNDINGBOX
Maxim Stere
2018-06-29 04:00:30 UTC
Permalink
Hi,

Is there a reason why OSG_USE_FLOAT_BOUNDINGBOX and OSG_USE_FLOAT_BOUNDINGSPHERE are set to YES in cmake by default?

Since most CPUs now use doubles natively and emulate floats, making float calculations a little slower, would it not be better for OSG speed and performance to have these options be set to OFF by default?

Doubles would take up more RAM but what is more important for intersection speeds in OSG, RAM use or CPU number crunching?

------------------------
Thank you,
--Maxim

------------------
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=74219#74219
Robert Osfield
2018-06-29 05:19:30 UTC
Permalink
Hi Maxim,

The default to BoundingBoxf and BoundingSphref is partly a historical reason.

Scene graphs traversals are memory bandwidth limited so you only want
to pay for the extra memory size if there is specific value in doing
so.

Robert.
Post by Maxim Stere
Hi,
Is there a reason why OSG_USE_FLOAT_BOUNDINGBOX and OSG_USE_FLOAT_BOUNDINGSPHERE are set to YES in cmake by default?
Since most CPUs now use doubles natively and emulate floats, making float calculations a little slower, would it not be better for OSG speed and performance to have these options be set to OFF by default?
Doubles would take up more RAM but what is more important for intersection speeds in OSG, RAM use or CPU number crunching?
------------------------
Thank you,
--Maxim
------------------
http://forum.openscenegraph.org/viewtopic.php?p=74219#74219
_______________________________________________
osg-users mailing list
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Maxim Stere
2018-06-29 11:50:16 UTC
Permalink
Correct,

But since system memory is fairly large now days, and cheap, would the performance bottleneck be in the RAM or the CPU?

Do we need to test this to see if Doubles vs Floats do a speedup in OSG?

------------------------
Thank you,
--Maxim

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

Loading...