lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


> Unless I'm mistaken, using the length operator (#) on a string just calls
> string.len() via metamethod

No, there is a VM instruction for the length operator.
Search for OP_LEN in
	http://www.lua.org/source/5.1/lvm.c.html#luaV_execute
	http://www.lua.org/source/5.2/lvm.c.html#luaV_execute