lua-users home
lua-l archive

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


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Luiz Henrique de Figueiredo wrote:
>> With C, I can drastically reduce the size of the source code by using a
>> cruncher utility: this reads in the C source and emits an equivalent but
>> smaller source file by removing whitespace, comments, renaming locals to
>> smaller versions, etc.
> 
> My lstrip does all that, except rename locals; but it's in C.

Unfortunately lstrip isn't suitable for me, but looking it up on Google
led me to LuaSrcDiet, which does pretty much what I want (...except
locals); so thanks anyway.

Runing LuaSrcDiet on pm reduces it down to 58%, which isn't bad.
Unfortunately, once this is bolted on to the Lua interpreter source
itself, this turns into a real reduction of the resulting binary to 95%
- --- which is barely worth measuring.

Local renaming would improve that no end, as I tend to use fairly long
variable names, but I suspect what I really need is a better C cruncher.
It ought to be possible to Huffman encode all symbol names by creative
use of #define. Hmm...

- --
┌─── dg@cowlark.com ───── http://www.cowlark.com ─────
│ "Wizards get cranky, / Dark days dawn, / Riders smell manky, / The
│ road goes on. / Omens are lowering, / Elves go West; / The Shire needs
│ scouring, / You may as well quest." - John M. Ford
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFH1AA0f9E0noFvlzgRAsBtAKDezTZ46xIgrrfGfWGMEeYmGJD+1ACg1VKs
DG3a2dLis7SW/9eI/dbEavc=
=U4uS
-----END PGP SIGNATURE-----