Comment by zamalek
2 years 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.
No comments yet
Contribute on Hacker News ↗