Hacker News new | ask | show | jobs
by hamidpalo 4470 days ago
The biggest issue with this benchmark is the unrealistic data model and the access pattern.

From my admittedly limited knowledge a better benchmark would involve:

- String keys because who uses int keys? It would be important to create a new set of query keys for retrieving values that would contain a mix of newly created strings as well as older ones to account for any hashcode memoization. - Non-primitive values. This would address the boxing overhead someone mentioned and would be much closer to real life usage. - Many more runs. Since there are performance implications of data access patterns due to spatial locality using a larger number of runs this would help even those out.

Another question is, why? The ultimate choice of Java vs C++ won't depend on how fast the standard hash tables are.