1.1 --- a/examples/simple_map.py Sat Sep 15 15:57:18 2007 +0000
1.2 +++ b/examples/simple_map.py Sat Sep 15 15:57:34 2007 +0000
1.3 @@ -28,13 +28,19 @@
1.4
1.5 t = time.time()
1.6
1.7 + # Initialise an array.
1.8 +
1.9 sequence = []
1.10 for i in range(0, N):
1.11 for j in range(0, N):
1.12 sequence.append((i, j))
1.13
1.14 + # Perform the work.
1.15 +
1.16 results = map(calculate, sequence)
1.17
1.18 + # Show the results.
1.19 +
1.20 print "Time taken:", time.time() - t
1.21 for i in range(0, N):
1.22 for result in results[i*N:i*N+N]: