lua-users home
lua-l archive

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


On Thursday 01 March 2007, Eike Decker wrote:
> Hi
>
> I am trying to develop an IDE for Luxinia, a 3D engine that is using lua
> for pretty much anything (http://www.luxinia.de). Performance is a critical
> key here, but lua does a good job on that.

first, i'd like to say that Luxinia seems to be very interesting! but it's 
windows only, so it's useless.  it would be far better if that was admitted 
in the front page, instead of having to search the requirements and/or look 
the download files.

now to your problem.  i'm guessing that the performance hit is because you're 
calling lua_pushstring() on your hook function.  do you really need the file 
name on the Lua stack? can't you manage that on the C side?  interning 
strings is not the fastest Lua operation...

if you really need it on the Lua stack, it might be faster to move around as a 
Lua value, so it doesn't have to be interned on each hook call.



-- 
Javier

Attachment: pgp1pnnK48OhY.pgp
Description: PGP signature