by voidmain · 1y ago · 0 comments
struct Strip {
x: u16,
y: u16,
alpha_idx_fill_gap: u32,
}
which looks like it is 64 bits (8 bytes) in size,and then says
> Since a single strip has a memory footprint of 64 bytes and a single alpha value is stored as u8, the necessary storage amounts to around 259 ∗ 64 + 7296 ≈ 24KB
am I missing something, or is it actually 259*8 + 7296 ≈ 9KB?
Whilst it's still very possible this was a simple mistake, an alternate explanation could be that each strip is allocated to a unique cache line. On modern x86_64 systems, a cache line is 64 bytes. If the renderer is attempting to mitigate false sharing, then it may be allocating each strip in its own cache line, instead of contiguously in memory.