Lua has a # operator to calculate the "length" of the table used as an array. In a language such as C, after you have calculated the length of something, you usually do not calculate it again. for example int len = strlen(string);
Is this something else in Lua? Is less effective than another?
(Obviously, this probably won't show a noticeable difference for fairly small tables, but it never knows badly.)
source share