title: Python str.translate VS str.replace
body: <p>Why in <strong><em>Python</em></strong> <code>replace</code> is ~1.5x quicker than <code>translate</code>?</p>
  
  <pre><code>In [188]: s = '1 a  2'
  
  In [189]: s.replace(' ','')
  Out[189]: '1a2'
  
  In [190]: s.translate(None,' ')
  Out[190]: '1a2'
  
  In [191]: %timeit s.replace(' ','')
  1000000 loops, best of 3: 399 ns per loop
  
  In [192]: %timeit s.translate(None,' ')
  1000000 loops, best of 3: 614 ns per loop
  </code></pre>