From Second Life Wiki
GetListLength
llGetListLength
Function: integer llGetListLength( list src );
Returns an integer that is the number of elements in the list src.
Notes
A faster and lighter (in bytecode) way to determine the length of a list is to do a not-equals compare with a null list. This works because the list not-equals compare returns the difference between the lengths.
list in;
integer len_in = llGetListLength(in);
integer flen_in = (in != []);
//flen_in and len_in will be the same
integer neg_len_in = -llGetListLength(in);
integer fneg_len_in = ([] != in);
//fneg_len_in and neg_len_in will be the same
Source Location
'linden\indra\lscript\lscript_library\lscript_alloc.cpp' @ lsa_cmp_lists
'linden\indra\lscript\lscript_execute\lscript_execute.cpp' @ list_list_operation