[pypy-commit] pypy default: try some unrolling strategy

fijal noreply at buildbot.pypy.org
Mon Dec 1 15:11:38 CET 2014


Author: Maciej Fijalkowski <fijall at gmail.com>
Branch: 
Changeset: r74774:bf9b7211befc
Date: 2014-12-01 16:11 +0200
http://bitbucket.org/pypy/pypy/changeset/bf9b7211befc/

Log:	try some unrolling strategy

diff --git a/rpython/rtyper/rlist.py b/rpython/rtyper/rlist.py
--- a/rpython/rtyper/rlist.py
+++ b/rpython/rtyper/rlist.py
@@ -983,6 +983,14 @@
 #
 #  Comparison.
 
+def listeq_unroll_case(l1, l2, eqfn):
+    if jit.isvirtual(l1) and len(l1) < 10:
+        return True
+    if jit.isvirtual(l2) and len(l2) < 10:
+        return True
+    return False
+
+ at jit.unroll_iff(listeq_unroll_case)
 def ll_listeq(l1, l2, eqfn):
     if not l1 and not l2:
         return True


More information about the pypy-commit mailing list