title: Fastest way to reverse a string in python
body: <p>I was able to come up with two different ways to reverse a string in Python. </p>
  
  <p>Commonsense dictates that the more lines of code the slower it runs.</p>
  
  <p>I made the following lines of code:</p>
  
  <p>Code1</p>
  
  <pre><code>"".join(reversed(map(lambda x:x,st)))
  </code></pre>
  
  <p>Code2</p>
  
  <pre><code>st[::-1]
  </code></pre>
  
  <p>These give similar performance. For a 20000 long string I am not able to see a difference of even a millisecond in performance.</p>
  
  <p>I think the first one should be a slower approach because it performs 3x more operations.</p>
  
  <p><strong>Question</strong></p>
  
  <p>Why am I not seeing a performance difference? </p>