But because it lacks a var declaration, it's a global variable.
但它缺少var声明,这是个全局变量。
Incrementing a global variable is 2 times slow than a local var.
递增一个全局变量要比递增一个局部变量慢2倍。
Just declaring a global variable without using it in a function also slows things down (by about the same amount as incrementing a local var).
仅定义一个局部变量而没在函数中调用它,同样会减慢速度(其程度相当于递增一个局部变量)。
应用推荐