lua-users home
lua-l archive

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


"Manish Jain" <manish.jain@globallogic.com> wrote:
> 
> I understand that it is not logical to compare performance of Lua(or any
> scripting) language with an application programming languages(like C),
> but I am struggling to improve performance of my Lua module. I
> understand that 'luac' does not help to improve performance. Do we have
> something in same direction to improve lua performance? Anything except
> moving to C will help.

0. Check your algorithms.
1. Use locals wherever possible.
2. Use LuaJIT.
3. Profile and code the bottlenecks (or have them coded) in C.

Is there a thread or a Wiki entry with the collected wisdom on how to
optimise and speed up Lua scripts? Ages ago, I looked for something like
that and found not a lot. IIRC, I was told that the forthcoming Gems
book will have a chapter about this (done by Roberto, I think).

-- 
cheers  thomasl

web: http://thomaslauer.com/start