Const stuff ?

Hello,

It may be a silly question and I guess I already have a part of the answer, but here we go :
I went through a lot of the OptiX SDK samples and noticed that in many cases (more often in the bounding box programs), const variables are used.
So, is there any performance interest in this ?

Thanks.

Hi,

for a short answer, yes, there is a performance benefit. const variables gives more hints to the compiler, and therefore it can better optimize the code.

Best,
GM