lua-users home
lua-l archive

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


Only between two Lua strings. If one of the strings is coming from C, it
needs to at least go through strcmp if not being actually converted to a Lua
string.

Mark

on 7/25/04 10:39 AM, Alex Sandro Queiroz e Silva at
ventonegro@ventonegro.org wrote:

> Hallo,
> 
> Mark Hamburg wrote:
>> The Lua 5 approach is somewhat less efficient than one might like. If
>> efficiency is a concern, there are a variety of things one can do:
>> 
>> * Rather than using strings to identify types, use light userdata. This
>> assumes that you have some permanent address to use for this purpose. This
>> will avoid some string manipulation when doing type-testing.
>> 
> 
> But in Lua a string comparison is just a pointer comparison, isn't it?
> 
> -alex