title: Best practice for holding huge lists of data in Java
body: <p>I'm writing a small system in Java in which i extract n-gram feature from text files and later need to perform Feature Selection process in order to select the most discriminators features.</p>
  
  <p>The Feature Extraction process for a single file return a Map which contains for each unique feature, its occurrences in the file. I merge all the file's Maps (Map) into one Map that contain the Document Frequency (DF) of all unique features extracted from all the files. The unified Map can contain above 10,000,000 entries.</p>
  
  <p>Currently the Feature Extraction process is working great and i want to perform Feature Selection in which i need to implement Information Gain or Gain Ratio. I will have to sort the Map first, perform computations and save the results in order to finally get a list of  (for each feature, its Feature Selection score)</p>
  
  <p>My question is: 
  What is the best practice and the best data structure to hold this large amount of data (~10M) and perform computations?</p>