Does variable name length matter for performance C#?

前端 未结 6 2320
别那么骄傲
别那么骄傲 2021-02-18 22:28

I\'ve been wondering if using long descriptive variable names in WinForms C# matters for performance? I\'m asking this question since in AutoIt v3 (interpreted language) it was

6条回答
  •  星月不相逢
    2021-02-18 22:46

    No, I don't think that long variable have any impact on the execution performance of a .NET application. AFAIK, intermediate code (in MSIL) in a .NET assembly is translated to machine language before it gets executed. This would be where variable names are definitely "thrown out" (if it hasn't already happened earlier) and replaced by simple memory addresses.

提交回复
热议问题