Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Quite. The whole point (haha) of an array is that you take a pointer to its first item + (the size of each item * the index number) and get a pointer to the item you want, which is bloody quick. No hashtable can compete with that - a hash is a compromise for when you can't use an int for whatever reason.


That's not the whole point of an array, an array also has practical uses!




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: