[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: Size optimizations for Lua 5.3 VM on ARM Cortex M4
- From: Coda Highland <chighland@...>
- Date: Sun, 17 Jun 2018 11:13:34 -0500
On Sat, Jun 16, 2018 at 12:18 PM, Abhijit Nandy <email@example.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 :) !
-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.