This week's book giveaways are in the Java EE and JavaScript forums.
We're giving away four copies each of The Java EE 7 Tutorial Volume 1 or Volume 2(winners choice) and jQuery UI in Action and have the authors on-line!
See this thread and this one for details.
The moose likes Performance and the fly likes Hash table Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Java » Performance
Bookmark "Hash table" Watch "Hash table" New topic
Author

Hash table

chandra maddila
Greenhorn

Joined: Jun 04, 2001
Posts: 1
Can I store 1 million records in a hash table for a web based application? How the performence will be effected?
George Brown
Ranch Hand

Joined: Sep 26, 2000
Posts: 919
why not try it with a noddy program to see?
You could put String representations of integer numbers into a hashtable indexed by the same integer number as an Integer object. Should be easy enough to knock up with a for loop (but make sure you have a LOT of memory first).
Wouldn't a persistent data store be a better option in the long run?
 
wood burning stoves
 
subject: Hash table