Sharing my knowledge.
I was learning LuaJIT bytecode some time ago, and discovered that for 64bit versions the TValue struct is actually shared between 2 TValues objects.
As assume this is done for pointer/RAM optimizations.
However, for the same reason LuaJIT had to make 2 versions of bytecode: regular (32 bit) and with FR2 (Frame Size 2). 64-bit bytecode is not compatible with 32-bit executable and the opposite.
Devs said they might add compatibility between them later, but this did not happen yet.
I don't have enough knowledge and experience in this field to say if that's a benefit, so I just shared some information I know.
Hi,
Work In Progress: About Lua structures
Sizeofs 64 bits (msvc 2019 64 bits):
Instruction: 4
TValue: 16
TString: 32
LClosure: 40
Proto: 128
Wouldn't Lua benefit from dividing struct Proto in two?
Would it pay off?
regards,
Ranier Vilela