|
|
|
|
|
by tialaramex
1172 days ago
|
|
You'd think right? Except nope, it's an API design problem. If you write a std::vector or equivalent but where reserve has analogous behaviour to Vec::reserve you can't do Vec::reserve_exact at all and that can really hurt in other cases. There really are two distinct features and C++ specifies a single API call. |
|
Still, this is going way down into the weeds and very far away that any mature AOT compiled language offers good enough speed, ignoring toy compilers done by students.