Does methods parameters order affects performance?

Usually, in programming languages, the first couple or so parameters for methods and functions are, in the very low level, stored in registers (as long as they fit). This is a very easy optimization that we can do in the first-time code, as it is not really intrusive and does not affect code readability or flexibility; and, in the end of the project, parameters reordering might be just way too dangerous.

However, does this apply to the Unity Player? I could try to benchmark it, but I think that some “solid” information would also be good to know.

For all intensive purposes, the order of your parameters should not have an impact on performance.

The purposes are not actually intensive. for all intensive purposes - Wiktionary, the free dictionary

1 Like