title: Store Text Files as Binary for Faster Read/Write
body: <p>I have a large set of text files that I need to process. The performance is pretty good now, thanks to <code>pmap()</code>,  but i'm looking for an additional speed-up. The current bottleneck is parsing strings into floats.</p>
  
  <p>I had the thought of loading my data (pipe delimited text files) and writing them to a binary format. From what I have seen Julia should be able to load my data faster this way. The problem is that I'm having some trouble with the proper way to load my binary data back into Julia after writing it as binary. </p>
  
  <p>Here's some example code I have for loading, parsing and writing to binary:</p>
  
  <pre><code>input_file = "/cool/input/file.dat"   ## -- pipe delimited text file of Floats
  output_file = "/cool/input/data_binary" 
  
  open(input_file, "r") do in_file
      open(output_file, "w") do out_file
          for line in eachline(in_file)
              split_line = split(line, '|')
              out_float = parse(Float64, split_line[4])
              write(out_file, out_float)
          end
      end
  end
  </code></pre>
  
  <p>The problem is that when I load the above file into Julia, I have no idea what the values are:</p>
  
  <pre><code>read(output_file)
  n-element Array{UInt8,1}:
   0x00
   0x00
   0x00
   0x00
   0x00
   0x80
   0x16
  </code></pre>
  
  <p>How can I use these binary values as floats in my Julia code? More generally, does it make sense to convert my text file data to binary in this way, if i'm looking for a performance increase? </p>