lua-users home
lua-l archive

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


On Jun 18, 2014, at 4:03 PM, Paige DePol <lual@serfnet.org> wrote:
> 
> 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
> 
> 

Yes it was unstripped, and no, of course it’s far from a real-world example. As with most binary formats, compiled Lua chunks have some fixed header overhead which of course is much more significant in such a trivial example.

As a more real-world example, I compiled and stripped a Lua pre-processor I use (written in 1,100 lines of dense Lua code)…

Source: 47,436 bytes
Compiled: 50,813 bytes
Compiled+Stripped: 31,327 bytes

To be fair, I comment code pretty extensively, so the source might end up about the same as compiled+stripped if I stripped out comments.

—Tim