title: What about store data into shared object?
body: <p>Eg I have some data which my program needs to load it. and I want to load it fast.</p>
  
  <p>I thinking there have 3 ways to load it.</p>
  
  <ol>
  <li>Write the data into JSON or XML and parse the data.</li>
  <li>Serialize the data into certain binary format and unserialize it.</li>
  <li>Write the data into c file and compile it store the data into <code>.so</code>, load the shared object using <code>dlopen</code>.</li>
  </ol>
  
  <p>Is the 3rd way a good idea?
  Or What is the fast way to load persistent data?</p>
  
  <p><strong>Background info:</strong></p>
  
  <blockquote>
    <p>Where do the data come from?</p>
  </blockquote>
  
  <p>The user who uses the program create the data.
  Could consider the data as config, the program is fixed but the data is flexible.</p>
  
  <blockquote>
    <p>Does your program only read the data?</p>
  </blockquote>
  
  <p>No, the program uses it, process it and maybe show it...</p>
  
  <blockquote>
    <p>How often will you change the data?</p>
  </blockquote>
  
  <p>Basically once, but I think that doesn't matter. I just want it to load fast every time during the program running.</p>
  
  <blockquote>
    <p>Will you prepare the data on the same machine where your program is
    running?</p>
  </blockquote>
  
  <p>No, the target machine is very very slow...in my case using cross-compiler(ARM).</p>
  
  <p><strong>More bg info:</strong></p>
  
  <p>I have a very low spec ARM board and want my program to load the config data as fast as possible. So I think to move the time of parsing to the data preparation phase. I don't care about the portability or complexity. Only need <strong>speed</strong>.</p>