splinter-build / splinter

A series of patches (one per branch) on top of the Ninja project's codebase. Updated periodically.
Apache License 2.0
6 stars 1 forks source link

Prefer vector over linked lists like data structs. #24

Open shahzadlone opened 5 years ago

shahzadlone commented 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.

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.