lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]

>>>>> "Roberto" == Roberto Ierusalimschy <> writes:

 Roberto> Hugo Gualandi came with the idea of using a packed structure
 Roberto> to store Lua values. Intel CPUs (and it seems ARMs too) can
 Roberto> work with unaligned data (or aligned with weaker boundaries)
 Roberto> and, at least for some architectures, with very small (or even
 Roberto> none) performance penalties.

While Intel cpus will usually read unaligned data without much penalty,
there are some issues with write/read operations on unaligned data.
Store forwarding (the ability to satisfy reads from within the write
buffers, rather than having to stall waiting for the write to retire)
demands specific alignment constraints, and the stalls can have a large

The issue of store-forwarding stalls was discussed a while back on the