title: What works faster: two dimensional arrays or list of lists
body: <p>I have a performance situation at hand. </p>
  
  <p>I have a huge amount of data to be held in memory in a two dimensional table format (12000 X 2000). Now as far as my knowledge goes either I can use <code>int[][]</code> or <code>List&lt;List&lt;Integer&gt;&gt;</code>. And, of course, I access the values using <code>int[i][j]</code> or <code>list.get(i).get(j)</code>. I am looping through the entire data at least five times.</p>
  
  <p>Which one do you think will work faster and, if you can answer, why? Also is there any way to speed up the execution?</p>
  
  <p>My <code>java -version</code> gives:<br/>
  <code>java version "1.6.0_29"<br/>
  Java(TM) SE Runtime Environment (build 1.6.0_29-b11)<br/>
  Java HotSpot(TM) Client VM (build 20.4-b02, mixed mode, sharing)</code><br/>
  The OS is Windows Vista.</p>