[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Which is faster?
- From: Luiz Henrique de Figueiredo <lhf@...>
- Date: Wed, 28 May 2003 23:03:26 -0300
>When getting null-terminated strings from Lua, does lua_strlen() offer any speed advantage over regular strlen() calls?
If you mean strlen from the C standard library, then yes.
Moreover, the C strlen does not apply to Lua strings because
Lua strings can have embedded zeros.
If you mean strlen from the Lua string library, now called string.len, then
string.len written on top of lua_strlen.
>Does anyone here know that for sure?
By all means, use lua_strlen.
--lhf