Practice
Learn
← Quit
0 / 0 correct
Rust
Hard
1 of 20
Why does reusing a buffer with buf.clear() in a loop help performance?
A
It zeroes memory faster
B
It makes the buffer static
C
clear() keeps the allocated capacity, so later pushes don't allocate again
D
clear() frees the memory