Open shahzadlone opened 5 years ago
std::map, std::unordered_map, std::array and etc. are all under the hood using linked list, this slows does the program quite a lot.
std::map
std::unordered_map
std::array
Here is a beautiful video that talks about these in more depths! https://www.youtube.com/watch?v=fHNmRkzxHWs&t=41m41s
Bonus: Even Bjarne Stroustrup recommends to only use vectors :).
Chances are we can make a better data structure (class) than the old linked list implementations of standard lib.
std::map
,std::unordered_map
,std::array
and etc. are all under the hood using linked list, this slows does the program quite a lot.Here is a beautiful video that talks about these in more depths! https://www.youtube.com/watch?v=fHNmRkzxHWs&t=41m41s
Bonus: Even Bjarne Stroustrup recommends to only use vectors :).
Chances are we can make a better data structure (class) than the old linked list implementations of standard lib.