title: parallel file parsing, multiple CPU cores
body: <p>I asked a related but very general question earlier (see especially <a href="https://stackoverflow.com/questions/3939912/python-execution-speed-laptop-vs-desktop/3939948#3939948">this response</a>). </p>
  
  <p>This question is very specific. This is all the code I care about:</p>
  
  <pre><code>result = {}
  for line in open('input.txt'):
    key, value = parse(line)
    result[key] = value
  </code></pre>
  
  <p>The function <code>parse</code> is completely self-contained (i.e., doesn't use any shared resources).</p>
  
  <p>I have Intel i7-920 CPU (4 cores, 8 threads; I think the threads are more relevant, but I'm not sure).</p>
  
  <p>What can I do to make my program use all the parallel capabilities of this CPU? </p>
  
  <p>I assume I can open this file for reading in 8 different threads without much performance penalty since disk access time is small relative to the total time.</p>