[pypy-commit] pypy numpy-speed: mark iter state fields immutable
bdkearns
noreply at buildbot.pypy.org
Fri Apr 18 00:09:12 CEST 2014
Author: Brian Kearns <bdkearns at gmail.com>
Branch: numpy-speed
Changeset: r70727:5edc38cf52ad
Date: 2014-04-17 17:44 -0400
http://bitbucket.org/pypy/pypy/changeset/5edc38cf52ad/
Log: mark iter state fields immutable
diff --git a/pypy/module/micronumpy/iterators.py b/pypy/module/micronumpy/iterators.py
--- a/pypy/module/micronumpy/iterators.py
+++ b/pypy/module/micronumpy/iterators.py
@@ -80,6 +80,8 @@
class IterState(object):
+ _immutable_fields_ = ['index', 'indices[*]', 'offset']
+
def __init__(self, index, indices, offset):
self.index = index
self.indices = indices
diff --git a/pypy/module/micronumpy/test/test_zjit.py b/pypy/module/micronumpy/test/test_zjit.py
--- a/pypy/module/micronumpy/test/test_zjit.py
+++ b/pypy/module/micronumpy/test/test_zjit.py
@@ -564,8 +564,8 @@
'float_mul': 2,
'getarrayitem_gc': 7,
'getarrayitem_gc_pure': 15,
- 'getfield_gc': 21,
- 'getfield_gc_pure': 31,
+ 'getfield_gc': 8,
+ 'getfield_gc_pure': 44,
'guard_class': 4,
'guard_false': 14,
'guard_not_invalidated': 2,
More information about the pypy-commit
mailing list