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

前端 未结 7 1304
灰色年华
灰色年华 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:28

    In compiled languages, almost certainly not; everything becomes a symbol in a symbol table. In interpreted languages, the answer is also no, with a few extremely rare exceptions (in certain older versions of Python there would be a difference, for example).

提交回复
热议问题