I am working on a game making (or really just general program making, but my question applies to games) DLL for opengl. It is almost done but the collision detection is a little bit slow since it has to calculate bounding boxes for each object repeatedly. I was thinking of storing six extra variables for each object (left,right,top,bottom,near,far) to remove the need for those calculations. The thing is that that will add (c++ code, compiler dependant)
6*sizeof(float) bytes to each object. My question is, on average how many objects do most games have in them (an object consisting of a list of triangles in 3d space that are bound together), and how much RAM taken is too much? Basically should I add the six variables to increase speed but increase memory, or not?