[pypy-commit] pypy default: Optimize join_results for write analyze.
alex_gaynor
noreply at buildbot.pypy.org
Sun Dec 16 13:01:55 CET 2012
Author: Alex Gaynor <alex.gaynor at gmail.com>
Branch:
Changeset: r59462:0f2f6fcca4d3
Date: 2012-12-16 04:01 -0800
http://bitbucket.org/pypy/pypy/changeset/0f2f6fcca4d3/
Log: Optimize join_results for write analyze.
diff --git a/pypy/translator/backendopt/writeanalyze.py b/pypy/translator/backendopt/writeanalyze.py
--- a/pypy/translator/backendopt/writeanalyze.py
+++ b/pypy/translator/backendopt/writeanalyze.py
@@ -16,6 +16,15 @@
return result1.union(result2)
@staticmethod
+ def join_results(results):
+ result = set()
+ for res in results:
+ if res is top_set:
+ return top_set
+ result |= res
+ return frozenset(result)
+
+ @staticmethod
def bottom_result():
return empty_set
More information about the pypy-commit
mailing list