[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Optimizing variable access from C
- From: "Curt Carpenter" <curtc@...>
- Date: Wed, 20 Feb 2002 11:06:10 -0800
I have some Lua variables that I want to access by name from both Lua
and C, and especially a lot from C. Is there any way to avoid the string
hash every time I do something like lua_pushstring/lua_gettable?
Thinking about it a bit more while typing this, it occurs to me that
maybe lua_ref/lua_getref on the strings of the variable names is the way
to go? Is lua_getref going to be significantly better than
lua_pushstring? Is there some other better way?
Thanks,
Curt