for examplethe following tests in pybench_cases py measure the impact of charging other iteration operations with function callwhich improves map' chances of winning the day per this earlier note--map usually loses by its association with function calls in generalpybench_cases py pythons +( ' :\python \python')( ' :\pypy\pypy- -beta \pypy')stmts +use function callsmap wins ( "[ord(xfor in 'spam ]")( "res=[]\nfor in 'spam res append(ord( ))")( "$listif (map(ord'spam ))")( "list(ord(xfor in 'spam )")set and dicts ( "{ * for in range( )}")( " =set()\nfor in range( ) add( * )")( "{xx * for in range( )}")( " ={}\nfor in range( ) [xx * ")pathological digits ( "len(str( ** ))")pypy loses on this today here is the script' results on these statement tests on cpython xshowing how map is quickest when function calls level the playing field (it lost earlier when the other tests ran an inline * ) :\codepy - pybench_cases py ( :bd afb ebf sep : : [msc bit (amd ) ["[ord(xfor in 'spam ]" ["res=[]\nfor in 'spam res append(ord( ))" ["list(map(ord'spam ))" ["list(ord(xfor in 'spam )" ['{ * for in range( )}' [' =set()\nfor in range( ) add( * )' ['{xx * for in range( )}' [' ={}\nfor in range( ) [xx * ' ['len(str( ** ))'as beforeon these tests today clocks in faster than and pypy is faster still on all of these tests but the last--which it loses by full order of magnitude ( )though it wins all the other tests here by the same degree howeverif you run file tests precoded in pybench_cases py you'll see that pypy also loses to cpython when reading files line by lineas for the following test tuple on the stmts list( " =open(' :/python /lib/pdb py')\nfor line in fx=line\nf close()")this test opens and reads , -line text file line by line using file iterators its input loop presumably dominates overall test time on this testcpython is twice as fast as but pypy is again an order of magnitude slower than cpython in general the benchmarking interlude