lua-users home
lua-l archive

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



On Jun 22, 2007, at 23:03, Luiz Henrique de Figueiredo wrote:

This change should make precompiled chunks smaller and probably faster
to load. I'd like feedback on this change: if you have reasonably large
Lua programs for which you may be able to measure any difference in size
and time to load them in precompiled form, I'd appreciate hearing from
you.

Here are some numbers related to a HTTP server implemented in Lua:

+------+-------+-------+-------+
| size |   lua |  luac |  dump |
+------+-------+-------+-------+
| HTTP | 13291 |  8101 |  7593 |
| MIME | 15752 | 12311 | 11899 |
| URL  | 12030 |  7566 |  7197 |
+------+-------+-------+-------+

Marginal impact on size.

The impact of the different compilation modes is measured indirectly by recording how many requests the server can handle per seconds:

% tcpserver -o -D -H -l -R 0 1080 lua TestHTTP.lua
% ab -n 1000 -c 10 http://localhost:1080/hello

+-------+-------+-------+
|   lua |  luac |  dump |
+-------+-------+-------+
| 57.43 | 89.48 | 87.48 |
+-------+-------+-------+

Marginal impact on load time.

Cheers,

PA.