Re: how to reduce the bytecode size, or perhaps it's a bug?

  • From: Mike Pall <mike-1311@xxxxxxxxxx>
  • To: luajit@xxxxxxxxxxxxx
  • Date: Wed, 27 Nov 2013 09:22:53 +0100

Weebeen Peng wrote:
> so, the luajit bytecode size is bigger than lua, the more table elements,
> the size is bigger.

LuaJIT bytecode is optimized for speed and only secondary for space.

> this is a demo
>  test.lua  is source file          (174411bytes)
>  test.luac is lua bytecode file    (111481bytes)
>  test.luaj is luajit bytecode file (154394bytes, bigger than luac)

Compress it, if you need to. The compressed size is smaller than
the equivalent Lua bytecode file. Actually, compressed source code
happens to be even smaller here.

BTW: The mailing list policy is very clear on sending binary
     files. Please don't do this again.

--Mike

Other related posts: