[pypy-svn] pypy numpy-exp: Fix for forcing with this benchmark.
alex_gaynor
commits-noreply at bitbucket.org
Thu May 5 01:20:44 CEST 2011
Author: Alex Gaynor <alex.gaynor at gmail.com>
Branch: numpy-exp
Changeset: r43901:281b07da091d
Date: 2011-05-04 19:20 -0400
http://bitbucket.org/pypy/pypy/changeset/281b07da091d/
Log: Fix for forcing with this benchmark.
diff --git a/pypy/module/micronumpy/bench/add.py b/pypy/module/micronumpy/bench/add.py
--- a/pypy/module/micronumpy/bench/add.py
+++ b/pypy/module/micronumpy/bench/add.py
@@ -4,7 +4,7 @@
def f():
a = numpy.zeros(10000000)
a = a + a + a + a + a
- if hasattr(a, 'force'):
- a.force()
+ # To ensure that the computation isn't totally optimized away.
+ a[0] = 3.0
f()
More information about the Pypy-commit
mailing list