4 ms·
I've skimmed through the book, is there no advice on things like cache locality? Cache misses and the like? SOA instead of AOS? These are like the central issue
by OskarS 6y ago
I've skimmed through the book, is there no advice on things like cache locality? Cache misses and the like? SOA instead of AOS? These are like the central issues of high performance code once you get past "maybe don't heap allocate in a hot loop" or whatever.
- couchand 6y agoIt looks like chapters 8 and 16 (at least) obliquely refer to those ideas. Perhaps if there are specific topics you think would be useful, you could open an issue or a PR? That being said, it looks to me like the main concern here is surfacing Rust specifics, rather than general performance concerns.
- iExploder 6y agofor the real work you'll have to use C. Rust use case is for crafting cool new age hacker news stories.
- nnethercote 6y agoThe book is primarily about Rust-specific things. Section 1 says: "Some of the techniques within are entirely Rust-specific, and some involve ideas that can be applied (often with modifications) to programs written in other languages." I will clarify this. Having said that, Section 16 does have general optimization advice, and I will consider adding some brief notes about the things you mentioned there. Thanks for the suggestion.
- staticassertion 6y agoThose aren't particularly Rust specific, except when Rust constructs make those things easier/ harder, which is how they're brought up. Someone could explain things like cache via Rust, but the information is language agnostic, whereas this book is very much Rust specific.