▲ | HaroldCindy 3 days ago | ||||||||||||||||
To be fair, both `Analysis` (the type-checker, not necessary at runtime or compile time) and `CodeGen` (the optional JIT engine) have no equivalent in PUC-Rio Lua. If you look purely at the VM and things necessary to compile bytecode (AST, Compiler and VM) then the difference in code size isn't as stark. Having worked with both Lua 5.1 and Luau VM code, Luau's codebase is a heck of a lot nicer to work on than the official Lua implementation even if it is more complex in performance-sensitive places. I have mixed feelings on the structural typing implementation, but the VM itself is quite good. | |||||||||||||||||
▲ | implicit 3 days ago | parent | next [-] | ||||||||||||||||
Further, these extra components are easy to omit if you don't want to use them. The REPL that we offer in the distribution doesn't include any of the analysis logic and it's just 1.7mb once compiled (on my M1 Macbook). I'm not sure how much smaller it gets if you omit CodeGen. Luau can be pretty small if you need it to be. | |||||||||||||||||
| |||||||||||||||||
▲ | aw1621107 3 days ago | parent | prev [-] | ||||||||||||||||
> If you look purely at the VM and things necessary to compile bytecode (AST, Compiler and VM) then the difference in code size isn't as stark. I suspected as much, but I didn't want to guess since I'm not familiar with either codebase. Thanks for the info! |