[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: RE: Faster tag methods
- From: "Curt Carpenter" <curtc@...>
- Date: Wed, 6 Mar 2002 18:18:15 -0800
> ... there's no particular reason to use a naive multi-strcmp()
approach.
Sure, the strcmps were just illustrative of the problem. (strncmp + atoi
is supposed to be better than just strcmp?) But the point is I don't
want to even hash the string EVERY time the tag method is invoked.
Luiz had a pretty decent solution actually. Someone else replied offline
of another idea, which is to rely on the fact that lua_tostring returns
a pointer to Lua's internal string, which means it's always the same,
which means I can effectively treat that as an id. I really like that.
Is that going to break in 4.1?
Thanks,
Curt