ShadowIce/smallpt.go — comment on commit 606f2c0a85741c73bd531803bc9d793a31f45cb3
File:  line 0
By ShadowIce:

I have to say, I don't remember much about this code, but I'll try....;)
I remember doing some trials with different implementations at one point which probably led to this change. If I'd have to guess I'd say it had something to do with all the .Clone() calls which may have been more expensive than calling a function that creates a copy through its return value. But I can't say if it was faster to have the parameters by value. There's probably still room for improvement. If it is faster by value than maybe dereferencing a pointer in Go is slower than copying a few bytes?