lua-users home
lua-l archive

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

On Jun 18, 2014, at 7:08 AM, Roberto Ierusalimschy <> wrote:

>>> Though I was hoping for an example of a real world script that is not just code golf to make a larger compiled file.
>>> ~pmd
>> I don't think that the example is so far away of the real world.
>> Think of configuration scripts, that essentially only store options.
> Two other arbitrary examples:
> 1) re.lua, from the LPeg package:
> source size:			  6286
> binary size:			128864
> binary size without debug info:   4934
> 2) SHA2.lua (as available in the Lua wiki):
> source size:			  8827
> binary size:			170111
> binary size without debug info:   6049
> (Keep in mind that configuration files probably have quite different
> profiles.)
> (I do not know how debug information can consume so much space! Probably
> this is worth some thought...)
> -- Roberto

I don't think you should worry too much about the binary size with debugging information, Roberto. Debug builds are just that, builds for debugging not for production. 

For example, my `lunia' executable right now is 652,388 bytes for a Debug build. For a Release build it drops to 194,344 bytes, or ~30% of the Debug build size.

In my experience Debug builds have always been bulkier than Release builds, but that is the trade-off for having useful debug information available when developing code! :)