title: Python timeit: results cached instead of calculated?
body: <p>I am testing several different algorithms (for solving 16x16 sudokus)
  against each other, measuring their performance using the timeit module. 
  However, it appears that only the first of the timeit.repeat() iterations is 
  actually calculated, because the other iterations are gotten much faster. 
  Testing a single algorithm with t.repeat(repeat=10, number=1) the following 
  results are gotten:</p>
  
  <p>[+] Results for......: solve1 (function 1/1)<br/>
  [+] Fastest..........: 0.00003099<br/>
  [+] Slowest..........: 32.38717794<br/>
  [+] Average*.........: 0.00003335 (avg. calculated w/o min/max values)<br/></p>
  
  <p>The first out of 10 results always takes an much larger time to complete, 
  which seems to be explainable only by the fact that iterations 2 to 10 of the 
  timeit.repeat() loop somehow use the cached results of the loop's previous 
  iterations. When actually using timeit.repeat() in a for loop to compare 
  several algorithms against each other, again it appears that the solution
  to the puzzle is calculated only once:</p>
  
  <p>[+] Results for......: solve1 (function 1/3)<br/>
  [+] Fastest..........: 0.00003099<br/>
  [+] Slowest..........: 16.33443809<br/>
  [+] Average*.........: 0.00003263 (avg. calculated w/o min/max values)<br/></p>
  
  <p>[+] Results for......: solve2 (function 2/3)<br/>
  [+] Fastest..........: 0.00365305<br/>
  [+] Slowest..........: 0.02915907<br/>
  [+] Average*.........: 0.00647599 (avg. calculated w/o min/max values)<br/></p>
  
  <p>[+] Results for......: solve3 (function 3/3)<br/>
  [+] Fastest..........: 0.00659299<br/>
  [+] Slowest..........: 0.02440906<br/>
  [+] Average*.........: 0.00717765 (avg. calculated w/o min/max values)<br/></p>
  
  <p>The really weird thing is that relative speed (in relation to each other) 
  of the algorithms is consistent throughout measurements, which would indicate 
  that all algorithms are calculating their own results. Is this extreme increase in performance due to the fact that a large part of the intermediate results (gotten 
  when computing the first solution) are still in some sort of cache, reserved by the 
  python proces? </p>
  
  <p>Any help/insights would be greatly appreciated.</p>