lua-users home
lua-l archive

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


On Jun 18, 2014, at 5:10 PM, Coda Highland <chighland@gmail.com> wrote:

> On Wed, Jun 18, 2014 at 2:54 PM, Tim Hill <drtimhill@gmail.com> wrote:
>> 
>> On Jun 18, 2014, at 3:50 AM, Paige DePol <lual@serfnet.org> wrote:
>> 
>>> 
>>> Do you have an example of a Lua script that results in a larger compiled file vs source file? I am curious to see how that could happen. I would think that having a script compile and be larger would be a fairly uncommon occurrence.
>>> 
>>> I can see how compressed source could be smaller than compressed compiled source, though on a restricted system that would just add additional memory and processing overhead for decompression. The idea was to skip parsing altogether and just load binary scripts, leaving the possibility of removing the parser from the library, which is a 35% reduction in the size of the Lua core according to Luiz.
>>> 
>>> ~pmd
>>> 
>>> 
>> 
>> Without wanting to be silly:
>> 
>> print(“hello world”)
>> 
>> Source: 22 bytes
>> compiled: 159 bytes
> 
> Is that stripped or unstripped?
> 
> /s/ Adam

Unstripped it seems, stripped I get 112 bytes... unstripped I get 143 bytes (on Lua 5.3w2).

However, I wouldn't exactly call that a "real world" example... though I notice my request for real world examples isn't in the post you quoted.

~pmd