Debian Codegraph @

pypy/module/array/benchmark/sumtst.py

raw symbols SCIP
1 #!/usr/bin/python
2 from array import array
3
4 def f(img):
5 l=0
6 i=0;
7 while i<640*480:
8 l+=img[i]
9 i+=1
10 return l
11
12 img=array('d', (0,)) * (640*480)
13
14 for l in range(500): f(img)
15
16 # C pypy-simple pypy cpython
17 # sumtst: 0m0.630s 0m0.659s 0m0.851s 0m33.447s
18 # intimg: 0m0.646s 0m1.078s 0m1.446s 1m0.279s