Author: Brian Kearns <[email protected]>
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,
_______________________________________________
pypy-commit mailing list
[email protected]
https://mail.python.org/mailman/listinfo/pypy-commit