>>106289603
I'm building a little ray-tracer (no graphics card stuff, just using the cpu). So far it's been fun to make. I started it basically passing around all my vectors, tuples etc by reference but got pissed off with the inability to chain function calls due to this so I just changed it to pass pretty much everything that isn't the canvas by value instead. Unexpectedly it has doubled the speed of the program (pic rel down from 1s to 0.4s to render on my shitty system). My question is, is there a inflection point to where passing by reference is better than passing by value or is it just one of those things that you have to play around with?