|
|
|
|
|
by dikaiosune
3530 days ago
|
|
I definitely haven't seen anything as comprehensive as the linked PDF for Rust (although that shouldn't be surprising given the extreme thoroughness of that guide and the age of C++). Probably a good project! When doing very performance sensitive things in Rust, I usually find myself asking questions a lot on IRC and looking at disassembly in perf. To answer some specific examples you cited above: I'm pretty sure that enums are (almost?) always equivalent to tagged unions. If you have an enum which doesn't contain any data, then I believe it's representation is just the tag. Iterators are just structs with methods, the various generic functions they implement are monomorphized and then optimized by LLVM. |
|