title: A suitable replacement for *****double
body: <p>I have this big data structure which is a list of lists of lists of lists of lists of doubles. Clearly it's extremely inefficient to handle. Around 70% of time spent to run my application is used to write zeros in the doubles at the end of the lists. I need a faster replacement which satisfies two constraints:</p>
  
  <p>1)All the memory must be allocated continuously (that is, a huge chunk of memory)</p>
  
  <p>2)I must access this chunk using the usual A[][][][][] syntax</p>
  
  <p>As for now, I thought of using a *double to hold the entire chunk and reuse my list of lists of... to store pointers to the appropriate areas in the chunk.</p>
  
  <p>Any better ideas?</p>