3 ms·
It's a performance optimization for growing datastructures. If you can use all the space that was actually allocated, you can (on average) call realloc less oft
by kzrdude 2y ago
It's a performance optimization for growing datastructures. If you can use all the space that was actually allocated, you can (on average) call realloc less often when the container is growing dynamically.