[pypy-commit] pypy default: correct the unroll logic for min/max
bdkearns
noreply at buildbot.pypy.org
Mon Mar 25 12:08:19 CET 2013
Author: Brian Kearns <bdkearns at gmail.com>
Branch:
Changeset: r62739:6d2bc9b00a8d
Date: 2013-03-25 07:07 -0400
http://bitbucket.org/pypy/pypy/changeset/6d2bc9b00a8d/
Log: correct the unroll logic for min/max
diff --git a/pypy/module/__builtin__/functional.py b/pypy/module/__builtin__/functional.py
--- a/pypy/module/__builtin__/functional.py
+++ b/pypy/module/__builtin__/functional.py
@@ -202,8 +202,8 @@
@specialize.arg(2)
def min_max(space, args, implementation_of):
- if not jit.we_are_jitted() or jit.loop_unrolling_heuristic(
- args.arguments_w, len(args.arguments_w)):
+ if not jit.we_are_jitted() or len(args.arguments_w) != 1 and \
+ jit.loop_unrolling_heuristic(args.arguments_w, len(args.arguments_w)):
return min_max_unroll(space, args, implementation_of)
else:
return min_max_normal(space, args, implementation_of)
More information about the pypy-commit
mailing list