lua-users home
lua-l archive

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


On Sat, Jun 16, 2018 at 12:18 PM, Abhijit Nandy <abhijit.nandy@gmail.com> wrote:
> Thanks Luiz. I will try that.
>
> I am working with Lua 4.0.1 code now. We have gotten the size to about 22k
> now with just the VM code and with the std libs removed and the -O2 and -Os
> options in place. -O3 for some reason seems to increase the size on arm gcc!
>
> I am hopeful of reducing it to about 18k with ldebug and opcode removals.
>
> Anyone knows the smallest ever size to which Lua with VM only, has ever been
> compiled :) !
>
> Thanks
> Abhijit

-O3 should be expected to increase binary size, as it performs
optimizations like unrolling and inlining. -Os is probably the flag
you want to use, because that enables performance optimizations that
don't increase the binary size.

/s/ Adam