title: Fastest way to save/read billions of 20bits numbers to/from magnetic disk
body: <p>I have billions of integer pairs of numbers to save/read to binary file on disk, and to elaborate as &quot;long&quot; for best speed.<br>All the numbers are in the range 1 to 999999 (decimal), therefore they fits in 20bits.</p>
  <p>With performance as first goal and 100MBytes/sec disk speed, and saving/reading in big chunks of &gt;1GB, which method do you expect to be the fastest?</p>
  <p>A) save/read each of them as original 32bit long<br>
  B) save/read them converting them in set of three to/from 64bit longlong? (20+20+20 fitted in 64 bits)</p>
  <p>I suppose that:<br>
  A) would require more disk saving/reading time<br>
  B) would require much CPU time for the conversions</p>
  <p>PS: I use VBA but I suppose that the thing is almost the same for all the languages</p>