I've been researching to find a faster alternative to list. In an algorithm book, hashtable seems to be the fastest using separate chaining. Then I found that java has an implementation of hashtable and from what I read it seems to it uses separate chaining. However, there is the overhead of synchronization so the implementation of hashmap is suggested as a faster alternative to hashtable.
My queations are:
- Is java
hashmapthe fastest data structure implemented in java to insert/delete/search? - While reading, a few posts had concerns about the memory usage of
hashmap. One post mentioned that an emptyhashmapoccupy 300 bytes. Ishashtablemore memory efficient thanhasmap? - Also, is the
hashfunction in each the most efficient forstrings?