Index: Tools/pybench/pybench.py =================================================================== --- Tools/pybench/pybench.py (révision 69371) +++ Tools/pybench/pybench.py (copie de travail) @@ -4,8 +4,6 @@ """ # -# Note: Please keep this module compatible to Python 1.5.2. -# # Tests may include features in later Python versions, but these # should then be embedded in try-except clauses in the configuration # module Setup.py. @@ -44,7 +42,7 @@ import pickle # Version number; version history: see README file ! -__version__ = '2.0' +__version__ = '2.1' ### Constants @@ -174,7 +172,7 @@ # Version number of the test as float (x.yy); this is important # for comparisons of benchmark runs - tests with unequal version # number will not get compared. - version = 2.0 + version = 2.1 # The number of abstract operations done in each round of the # test. An operation is the basic unit of what you want to @@ -403,7 +401,7 @@ roundtime = 0 # Benchmark version number as float x.yy - version = 2.0 + version = 2.1 # Produce verbose output ? verbose = 0 Index: Tools/pybench/Calls.py =================================================================== --- Tools/pybench/Calls.py (révision 69371) +++ Tools/pybench/Calls.py (copie de travail) @@ -2,7 +2,7 @@ class PythonFunctionCalls(Test): - version = 2.0 + version = 2.1 operations = 5*(1+4+4+2) rounds = 60000 @@ -178,8 +178,8 @@ # localize functions f0 = globals f1 = hash - f2 = cmp - f3 = range + f2 = divmod + f3 = max # do calls for i in range(self.rounds): @@ -279,8 +279,8 @@ # localize functions f0 = dir f1 = hash - f2 = range - f3 = range + f2 = divmod + f3 = max # do calls for i in range(self.rounds): Index: Tools/pybench/README =================================================================== --- Tools/pybench/README (révision 69371) +++ Tools/pybench/README (copie de travail) @@ -82,7 +82,7 @@ --examples show examples of usage Version: - 2.0 + 2.1 The normal operation is to run the suite and display the results. Use -f to save them for later reuse or comparisons. @@ -95,9 +95,9 @@ Examples: -python2.1 pybench.py -f p21.pybench -python2.5 pybench.py -f p25.pybench -python pybench.py -s p25.pybench -c p21.pybench +python3.0 pybench.py -f p30.pybench +python3.1 pybench.py -f p31.pybench +python pybench.py -s p31.pybench -c p30.pybench """ License @@ -111,9 +111,9 @@ """ ------------------------------------------------------------------------------- -PYBENCH 2.0 +PYBENCH 2.1 ------------------------------------------------------------------------------- -* using Python 2.4.2 +* using CPython 3.0 * disabled garbage collection * system check interval set to maximum: 2147483647 * using timer: time.time @@ -141,8 +141,9 @@ Processor: x86_64 Python: + Implementation: CPython Executable: /usr/local/bin/python - Version: 2.4.2 + Version: 3.0 Compiler: GCC 3.3.4 (pre 3.3.5 20040809) Bits: 64bit Build: Oct 1 2005 15:24:35 (#1) @@ -331,6 +332,11 @@ Version History --------------- + 2.1: made some minor changes for compatibility with Python 3.0: + - replaced cmp with complex and range with pow in Calls.py + (cmp no longer exists in 3.0, and range is a list in + Python 2.x and an iterator in Python 3.x) + 2.0: rewrote parts of pybench which resulted in more repeatable timings: - made timer a parameter