Does how you name a variable have any impact on the memory usage of an application?

前端 未结 7 1314
灰色年华
灰色年华 2021-02-20 09:05

Declaring a variable name, how much (if at all) impact does the length of its name have to the total memory of the application? Is there a maximum length anyway? Or are we free

7条回答
  •  渐次进展
    2021-02-20 09:26

    As stated by others, variable names disappear in compiled languages. I believe that local variable names in .Net may be discarded. But generally speaking, even in an interpreted language, the memory consumption of variable names is negligible, especially in light of the advantages of good variable names.

提交回复
热议问题