[fpc-pascal] Cache-line alignment for records

Hairy Pixels genericptr at gmail.com
Wed Mar 29 15:11:40 CEST 2023



> On Mar 29, 2023, at 1:33 PM, Sven Barth via fpc-pascal <fpc-pascal at lists.freepascal.org> wrote:
> 
> No, array types are defined as never having padding between the elements. You need to make sure that the element is appropriately sized then. 
> 

Wouldn’t that be better for performance if each element was padded to align with the cache? That seems like something the compiler could do easily for you behind the scenes. I may not understand the need to "align the elements on the cache” though.

Regards,
Ryan Joseph



More information about the fpc-pascal mailing list