3 ms·
As I mentioned in a couple sibling comments, it looks I didn't do a great job explaining what I meant here, but my basic point was that if I want to optimize m
by saghm 9y ago
As I mentioned in a couple sibling comments, it looks I didn't do a great job explaining what I meant here, but my basic point was that if I want to optimize my program by minimizing heap allocations, I can ignore all `&str`, `&[T]`, `&T`, etc. and just focus on `Vec`, `String`, `Box`, etc. In Go, there isn't any clear boundary like this, so I'm forced to reason about every slice and pointer to determine if they're doing heap allocations or not.