lua-aot-5.4 icon indicating copy to clipboard operation
lua-aot-5.4 copied to clipboard

Add `-b` and `-g`, for creating bytecode before compile

Open Frityet opened this issue 1 year ago • 4 comments
trafficstars

Fixes #19

Frityet avatar Jul 05 '24 00:07 Frityet

I would have hoped that compiling to bytecode would reduce the binary size. Since it doesn't, maybe it would be simpler to just strip the shebangs from the source string?

hugomg avatar Jul 05 '24 22:07 hugomg

I would have hoped that compiling to bytecode would reduce the binary size

it does sometimes, ive had much much better binary sizes with larger files. Another good reason to use bytecode is obsufication. With the string you can get the full lua source which could be not desired.

Frityet avatar Jul 25 '24 16:07 Frityet

Also, could you please tell some more about your experience with -b and -g?

  • How much space did -b save on larger files?
  • How much space did -g save?
  • Is it ok to strip debug info by default? Does it affect the stack traces?

hugomg avatar Jul 25 '24 17:07 hugomg

Also, could you please tell some more about your experience with -b and -g?

* How much space did -b save on larger files?

* How much space did -g save?

* Is it ok to strip debug info by default? Does it affect the stack traces?

ill show benchmarks, give me a couple of days

Frityet avatar Jul 26 '24 06:07 Frityet