3 ms·
It's even more true for larger collections. Stroustrup gave a talk on this back at GoingNative2012. Tl;Dr: "Use a Vectah" -Bjarne https://youtu.be/YQs6IC-vgmo
by elromulous 3y ago
It's even more true for larger collections. Stroustrup gave a talk on this back at GoingNative2012. Tl;Dr: "Use a Vectah" -Bjarne
https://youtu.be/YQs6IC-vgmo https://youtu.be/YQs6IC-vgmo
- CyberDildonics 3y agoA vector should be people's default data structure, but this presentation is bizarre, because it is based on looping through every element of a vector or a list to find the element you want. This is never a scenario that should happen, because if you are going to retrieve an arbitrary element it should be in a hash map or sorted map.