lua-users home
lua-l archive

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


Hi,

Marco Pontello wrote:
> Yeah! I'm adapting my DogLua code to try to put LuaJIT at good use. I
> think/hope that the speed increment on graphics filters done in Lua
> will be very noticeable.
> Will report on that as soon as I have it working.

This sounds interesting, please do!

Looking at the examples I notice that a simple 'local' in front
of all the variables would increase performance substantially
even with plain Lua (with LuaJIT, too).

[IMHO even though this is a tool for non-programmers, it's not
a good idea to protect them from all aspects of the language
(i.e. proper use of local variables).]

Caching all globals (get_value() etc.) in locals would improve
performance, too. You can make this invisible for the user by
attaching a standard prologue before lua_load()'ing the files.

Bye,
     Mike