1. Brent Pedersen
  2. pypy

Commits

Maciej Fijalkowski  committed 8550f8c

some simple benchmarks

  • Participants
  • Parent commits 40a28da
  • Branches numpy-exp

Comments (0)

Files changed (2)

File pypy/module/micronumpy/bench/add.py

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

File pypy/module/micronumpy/bench/iterate.py

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