4 ms·
Somewhat related; I was building a game a few years ago and passing 4x4 matrices (128 bytes) by value was faster than pass by reference. I don't know exactly h
by sesteel 8y ago
Somewhat related; I was building a game a few years ago and passing 4x4 matrices (128 bytes) by value was faster than pass by reference. I don't know exactly how many bytes can be passed by value before it becomes slower, but please don't read this and mindlessly assume pass by value is slower.
- Cthulhu_ 8y agoAlso, take GC pressure into consideration; pass by value is 'free' in that it does not put data onto the heap and thus does not cause any GC overhead.