Everything you learned in undergrad CS is wrong, because cache.
Other examples: Never, EVER use linked lists. Arrays and vectors are almost always faster to the point where banning linked lists is a sound strategy. And it is often literally faster to search, say, an array of packed key-value pairs than to use a hash table with pointers.
8
u/bitwize Jul 20 '20
Everything you learned in undergrad CS is wrong, because cache.
Other examples: Never, EVER use linked lists. Arrays and vectors are almost always faster to the point where banning linked lists is a sound strategy. And it is often literally faster to search, say, an array of packed key-value pairs than to use a hash table with pointers.