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

When in doubt, use brute force. -- Ken Thompson

Using hashes as a first choice data structure is not necessarily a bad idea. 1] Until profiling a working implementation demonstrates otherwise, other data structures may be premature optimization.

[1] Clearly an improvement over the Lisper's association lists.



It's not an improvement over small association lists. At least in Common Lisp hashes are pretty heavy and assoc lists will outperform them if there are less than ~100 elements.




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

Search: