lua-users home
lua-l archive

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

Petite Abeille wrote:
On Nov 16, 2009, at 1:38 PM, Mike Pall wrote:

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.

While at this conjuncture the JIT itself doesn't make much of a difference for a typical Web app, the VM does:

% lua -v Nanoki.lua . 0 1080
Requests per second:    773.17 [#/sec] (mean)
% luajit -v Nanoki.lua . 0 1080
Requests per second:    1174.19 [#/sec] (mean)
% luajit -v -joff Nanoki.lua . 0 1080
Requests per second:    1167.37 [#/sec] (mean)

Also, if the "CGI" type launcher supports persistent connections by reusing a process for the lifetime of a connection, then one might benefit from the JIT itself at some point.

Hmmm... I suppose I will take the hint and try a JIT build of luafcgid. I have been itching to bench my new toy on an AMD LX800 box that is laying around (ALIX 2 series). Any suggestions for a suitable test script?

It would be more compelling if it actually accomplished some (semi)useful work. I was thinking of creating some fractal JPGs using GD, but then someone smacked me and I woke up. Perhaps if it made a simple custom PDF based on the URL parameters?