Commits

Maciej Fijalkowski committed 8550f8c

some simple benchmarks

Comments (0)

Files changed (2)

pypy/module/micronumpy/bench/add.py

+
+import numpy
+
+def f():
+    a = numpy.zeros(1000000)
+    a = a + a + a + a + a
+    if hasattr(a, 'force'):
+        a.force()
+
+f()

pypy/module/micronumpy/bench/iterate.py

+
+def f():
+    sum = 0
+    a = numpy.zeros(1000000)
+    for i in range(1000000):
+        sum += a[i]
+    return sum
+
+f()