title: Static Data Structures on Embedded Devices (Android in particular)
body: <p>I've started working on some Android applications and have a question regarding how people normally deal with situations where you have a static data set and have an application where that data is needed in memory as one of the standard java collections or as an array.</p>
  
  <p>In my current specific issue i have a spreadsheet with some pre-calculated data.  It consists of ~100 rows and 3 columns.  1 Column is a string, 1 column is a float, 1 column is an integer.  I need access to this data as an array in java.</p>
  
  <p>It seems like i could:</p>
  
  <p>1) Encode in XML - This would be cpu intensive to decode in my experience.</p>
  
  <p>2) build into SQLite database - seems like a lot of overhead for static access to data i only need array style access to in ram.</p>
  
  <p>3) Build into binary blob and read in.  (never done this in java, i miss void *)</p>
  
  <p>4) Build a python script to take the CSV version of my data and spit out a java function that adds the values to my desired structure with hard coded values.</p>
  
  <p>5) Store a string array via androids resource mechanism and compute the other 2 columns on application load.  In my case the computation would require a lot of calls to Math.log, Math.pow and Math.floor which i'd rather not have to do for load time and battery usage reasons.</p>
  
  <p>I mostly work in low power embedded applications in C and as such #4 is what i'm used to doing in these situations.</p>
  
  <p>It just seems like it should be far easier to gain access to static data structures in java/android.  </p>
  
  <p>Perhaps I'm just being too battery usage conscious and in my single case i imagine the answer is that it doesn't matter much, but if every application took that stance it could begin to matter. </p>
  
  <p>What approaches do people usually take in this situation? Anything I missed?</p>