1. import timeit
  2.  
  3. print timeit.repeat("array( 'B', map(ord,a) ).tostring()",setup="from array import array;a = list('all the world is a stage and all the men and women merely players')")
  4. print timeit.repeat("''.join(a)",setup="from array import array;a = list('all the world is a stage and all the men and women merely players')")