News for hackers. Stuff that matters.
Re:Compact Representations for Arrays in Lua [pdf] by ethan_smith on Saturday June 21, 2025 @10:04PM (#44342640)
`__attribute__((packed))` wouldn't help here since the issue is about Lua's array/hash hybrid table design and memory allocation strategy, not C struct padding.
Re:Compact Representations for Arrays in Lua [pdf] by lifthrasiir on Saturday June 21, 2025 @10:52PM (#44342988)
But it did help in the other way, in my reading of the paper [1]. So the OP is asking why this is not even an option on supported environments, and I too think that this is indeed a good question to ask.

[1] "Hugo Gualandi reported that just adding the gcc attribute __attribute__((packed)) to the definition of the structure TValue reduces its size from 16 to 9 bytes, without any sensible difference in performance."

Re:Compact Representations for Arrays in Lua [pdf] by hugomg on Sunday June 22, 2025 @02:14PM (#44349024)
We figured that it wasn't worth dealing with the hassle of unaligned addresses because the more portable alternatives worked just as well.