Re:Should Small Rust Structs be Passed by-copy or by-borrow?
by bjackman on Saturday December 31, 2022 @04:51PM
(#34201139)
Yeah inline is an absolute classic for this. The number of uncommented __attribute__((always_inline))s I see in C code drives me crazy. There are absolutely legitimate reasons to use that attribute but there should ALWAYS be a comment about why, so that later readers know in what conditions they can safely remove it.
[ Parent
| on HN ]
Re:Should Small Rust Structs be Passed by-copy or by-borrow?
by phkahler on Saturday December 31, 2022 @09:12PM
(#34202882)
In the old days I saw C code with massive overuse of the "register" keyword. Meaning this variable should be kept in a register. Someone had ove 12 of these in one function back when that was waaaay more variables then processors had registers.
Good thing modern register allocation by compilers makes this irrelevant.