lua-users home
lua-l archive

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


We are using general aspects of Lua
1) Simple constructs like if, for, repeat, gsub, function calls, etc etc
2) we are using very less number of global variables.
3) we have registered few C functions and we are calling them in our lua
module.

Please share tips and tricks so that we can use them.

Best Regards,
Manish Jain
-----Original Message-----
From: lua-bounces@bazar2.conectiva.com.br
[mailto:lua-bounces@bazar2.conectiva.com.br] On Behalf Of Rob Kendrick
Sent: Monday, July 21, 2008 6:16 PM
To: lua@bazar2.conectiva.com.br
Subject: Re: Lua: Performance

On Mon, 21 Jul 2008 18:02:39 +0530
"Manish Jain" <manish.jain@globallogic.com> wrote:

> Hi,
> 
> 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.

What specific aspects are you having performance troubles with?  Lua is
already among the fastest available scripting languages, but there are
several tips and tricks you can employ to improve the performance of
your code without changing Lua itself.  One common error, for example,
is to assume the performance of globals is good compared to that of
locals.

B.