Thursday, January 10, 2008

c# Performance snippet - Sending value types to function as REF

Something new I've found out is that if you have a function that you call many times and it has value parameters its worth considering sending these parameters as Ref. By doing so you'll send only the memory address and not generate a new value type.

No comments: