lua-users home
lua-l archive

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

> -----Original Message-----
> From: 
> [] On Behalf Of 
> Sent: Thursday, October 14, 2004 1:27 PM
> To:
> Subject: Re: Userdata with methods *and* table access.

> Depending on how many keys one have to compare and their 
> difference in length, gperf 
> ( can also be a 
> good friend. 

 I was considering hashes, but doesn't Lua internally keep a hashed version
of the string?  Is there a way to get to that?  Or can I count on the const
char pointer returned from lua_tostring to be the same for the same strings
(this sounds really hacky)?  As it is now my innermost scripted loops are
doing string compares at the binding layer which makes them less efficient
than they could be with a good hash.