[pypy-commit] pypy concurrent-marksweep: It seems that not using "borrowed vars" is much more efficient.
arigo
noreply at buildbot.pypy.org
Mon Oct 24 19:38:26 CEST 2011
Author: Armin Rigo <arigo at tunes.org>
Branch: concurrent-marksweep
Changeset: r48384:229af044431a
Date: 2011-10-24 19:35 +0200
http://bitbucket.org/pypy/pypy/changeset/229af044431a/
Log: It seems that not using "borrowed vars" is much more efficient.
diff --git a/pypy/rpython/memory/gctransform/framework.py b/pypy/rpython/memory/gctransform/framework.py
--- a/pypy/rpython/memory/gctransform/framework.py
+++ b/pypy/rpython/memory/gctransform/framework.py
@@ -1222,9 +1222,8 @@
pass
def get_livevars_for_roots(self, hop, keep_current_args=False):
- if self.gcdata.gc.moving_gc and not keep_current_args:
- # moving GCs don't borrow, so the caller does not need to keep
- # the arguments alive
+ if not keep_current_args:
+ # the caller does not need to keep the arguments alive
livevars = [var for var in hop.livevars_after_op()
if not var_ispyobj(var)]
else:
@@ -1267,10 +1266,9 @@
hop.genop("gc_reload_possibly_moved", [v_newaddr, var])
def compute_borrowed_vars(self, graph):
- # XXX temporary workaround, should be done more correctly
- if self.gcdata.gc.moving_gc:
- return lambda v: False
- return super(FrameworkGCTransformer, self).compute_borrowed_vars(graph)
+ # we don't use borrowed vars with our own GCs, because it seems
+ # to be always more efficient not to.
+ return lambda v: False
class TransformerLayoutBuilder(gctypelayout.TypeLayoutBuilder):
More information about the pypy-commit
mailing list