In this quite popular video from the CppCon Chandler Carruth criticize other containers and says we should use only vector, like in 99% of cases. As it's better for cached modern processors' architecture. If about std::list and std::dequeue it's quite understandable, but how we should use std::vector instead of map or unordered_map? Of course I understand that one video from the conference doesn't mean that it's the only correct thing to do, but I've became really curious it is really possible to use vectors instead of the maps in a way that the program still be readable?
Aucun commentaire:
Enregistrer un commentaire