lua-users home
lua-l archive

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


On Mon, Nov 16, 2009 at 10:38 AM, Mike Pall <mikelu-0911@mike.de> wrote:
> Maybe the real question I'd like to ask is: would it hurt to run a cgi-based
> application using LuaJIT?

It wouldn't hurt. But you wouldn't see much of a difference,
either. If the Lua code for request handling is only run once,
it's probably not compiled at all. So you're not getting any
benefit from a JIT compiler.

I know, but there are some cases where there are a number of repetitive tasks to be performed, and I just wanted to have these cases covered in case there was nothing to lose for the ordinary cases.
 
Consider using FastCGI which eliminates the process startup
overhead. And keep the same lua_State alive across many requests,
so the Lua code can get compiled. This should give you much better
performance.

I know, but as I need to install in several environments, I'd like to keep most possibilities open (and CGI is the most problematic in terms of performance).
 
--
Luís Eduardo Jason Santos