|
|
|
|
|
by OptionOfT
60 days ago
|
|
Problem with languages like Go is, because they have GC, their API is less tuned to the ability to prevent new allocations. In C you see lots of functions whose first parameter is a buffer that will be re-used. And even in Rust you don't see this often, because reusing a buffer means having to do &mut, which means having to re-structure your code. And it's really easy to do Vec::new(). |
|