3 ms·
Did you want alignment sorting? In general the problem with things like that is the ideal layout is usually architecture and application specific - if my struct
by JonChesterfield 3y ago
Did you want alignment sorting? In general the problem with things like that is the ideal layout is usually architecture and application specific - if my struct has padding in it to push elements onto different cache lines, I don't want the struct reordered.
- zamalek 3y ago> Did you want alignment sorting? Yep. It will probably improve (to be measured) the 80%. Less memory means less bandwidth usage etc. > if my struct has padding in it to push elements onto different cache lines, I don't want the struct reordered. I did suggest having a repr for situations like yours. Something like #[repr(yeet)]. Optimizing for false sharing etc. is probably well within 5% of code that exists today, and is usually wrapped up in a library that presents a specific data structure.