feat: add python3 benchmark runner and fix python3 compatibility in benchmark scripts

Add python3 as a new language entry in the benchmark runner configuration, enabling automated performance testing with Python 3. Update multiple benchmark scripts (binary_trees.py, delta_blue.py, fib.py, for.py, method_call.py) to be compatible with Python 3 by adding `from __future__ import print_function`, replacing `xrange` with a `range` polyfill, converting print statements to function calls, and replacing integer division with floor division. Remove the custom `OrderedCollection` class in delta_blue.py in favor of standard Python lists.
This commit is contained in:
Bob Nystrom
2014-02-13 01:22:42 +00:00
parent 05857c8b47
commit c04865df2e
6 changed files with 59 additions and 35 deletions
+1
View File
@@ -47,6 +47,7 @@ LANGUAGES = [
("lua", ["lua"], ".lua"),
("luajit (-joff)", ["luajit", "-joff"], ".lua"),
("python", ["python"], ".py"),
("python3", ["python3"], ".py"),
("ruby", ["ruby"], ".rb")
]