CA1809: Avoid excessive locals
Visual Studio 2012
|
TypeName |
AvoidExcessiveLocals |
|
CheckId |
CA1809 |
|
Category |
Microsoft.Performance |
|
Breaking Change |
Non-breaking |
A common performance optimization is to store a value in a processor register instead of in memory, which is referred to as enregistering the value. The common language runtime considers up to 64 local variables for enregistration. Variables that are not enregistered are put on the stack and must be moved to a register before manipulation. To allow the chance that all local variables get enregistered, limit the number of local variables to 64.