lua-users home
lua-l archive

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


It was thus said that the Great Jairo A. del Rio once stated:
> 
> No, not really, but bytecode makes module loading a small bit faster, so
> I'd prefer to generate it in a platform (e. g. Ubuntu) and then use it in
> another without recompiling.

  Is it actually too slow?  Or just something you think is too slow?  Also,
a portable byte code may also be slower loading than the native byte code
(if only to deal with issues of CPU endian).  Also, recall that this may
complicate your build/install system to ensure any third party Lua module is
also compiled.  I say this as I did this for my Gopher server [1].  I
compiled the Lua code for the Gopher server and timed how long it takes to
start up (well, start up, read the config file and then exit):

	Lua text based:		.036s
	Lua compressed:		.033s

  BUT there are 16 other Lua modules loaded that aren't compressed, so it's
not a valid itest.  It does, however, show me that it would be painful to
compress said third party Lua modules, at least for this example.  Your
milage may vary, but it is something to keep in mind.

  -spc

[1]	https://github.com/spc476/port70