title: Writing a CPU bound script to gauge rough CPU performance
body: <p>I have wrote a script and running it on different machines. Script looks like below</p>
  
  <pre><code>def f(n):
      x = None
      while n:
          x = simple_math(n)
          n -= 1
      return x
  
  start = now()
  f(BIGNUM)    
  print now() - start   
  </code></pre>
  
  <p>At the end of the script it print how much time does it take to finish. Is this good enough to  compare different machine for practical CPU speed for <strong>simple Python scripts</strong>? </p>
  
  <p>By simple I mean it does not use multiprocessing module or any other technique to take advantage of multi-core machines.</p>
  
  <p>This question is <em>not</em> about </p>
  
  <ul>
  <li>making python programs run faster</li>
  <li>multiprocessing module</li>
  <li>GIL, I/O efficiency etc.</li>
  <li>non cPython programs </li>
  </ul>
  
  <p>Just that I want make sure if my approach to understand CPU performance among machines is fairly correct.</p>