Skip to content

Commit 4fe48b3

Browse files
author
Andrija Kolic
committed
[GR-69564] Add iterations and summary functions to python interpreter benchmarks
PullRequest: graalpython/4022
2 parents 2dee9e8 + 2315bc2 commit 4fe48b3

File tree

5 files changed

+58
-1
lines changed

5 files changed

+58
-1
lines changed

benchmarks/interpreter/deltablue.py

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,19 @@
3939
the layout & logic from the original. (Ugh.)
4040
4141
"""
42+
# Used in the polybench harness as the default number of iterations for
43+
# this benchmark.
44+
def iterations():
45+
return 60
46+
47+
# Used in the polybench harness for aggregating the iteration datapoints.
48+
def summary():
49+
return {
50+
"name": "OutlierRemovalAverageSummary",
51+
"lower-threshold": 0.1,
52+
"upper-threshold": 0.4,
53+
}
54+
4255
# The JS variant implements "OrderedCollection", which basically completely
4356
# overlaps with ``list``. So we'll cheat. :D
4457
class OrderedCollection(list):

benchmarks/interpreter/fibonacci.py

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,24 @@
2121
# or visit www.oracle.com if you need additional information or have any
2222
# questions.
2323

24+
# Used in the polybench harness as the default number of warmup iterations
25+
# for this benchmark.
26+
def warmupIterations():
27+
return 10
28+
29+
# Used in the polybench harness as the default number of iterations for
30+
# this benchmark.
31+
def iterations():
32+
return 30
33+
34+
# Used in the polybench harness for aggregating the iteration datapoints.
35+
def summary():
36+
return {
37+
"name": "OutlierRemovalAverageSummary",
38+
"lower-threshold": 0,
39+
"upper-threshold": 0.3,
40+
}
41+
2442
def fibonacci(n):
2543
if n < 1:
2644
return 0

benchmarks/interpreter/richards.py

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,19 @@
4545
# Outer loop added by Alex Jacoby
4646
from __future__ import print_function
4747

48+
# Used in the polybench harness as the default number of iterations for
49+
# this benchmark.
50+
def iterations():
51+
return 60
52+
53+
# Used in the polybench harness for aggregating the iteration datapoints.
54+
def summary():
55+
return {
56+
"name": "OutlierRemovalAverageSummary",
57+
"lower-threshold": 0.05,
58+
"upper-threshold": 0.2,
59+
}
60+
4861
# Task IDs
4962
I_IDLE = 1
5063
I_WORK = 2

benchmarks/interpreter/sieve.py

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,19 @@
2121
# or visit www.oracle.com if you need additional information or have any
2222
# questions.
2323

24+
# Used in the polybench harness as the default number of iterations for
25+
# this benchmark.
26+
def iterations():
27+
return 90
28+
29+
# Used in the polybench harness for aggregating the iteration datapoints.
30+
def summary():
31+
return {
32+
"name": "OutlierRemovalAverageSummary",
33+
"lower-threshold": 0.1,
34+
"upper-threshold": 0.4,
35+
}
36+
2437
def run():
2538
number = 600000
2639
primes = list(range(0, number+1))

mx.graalpython/polybench-fork-counts.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"polybench:warmup/pyflate-fast.py": 3,
3-
"polybench:warmup/raytracer.py": 3,
3+
"polybench:warmup/raytrace.py": 3,
44
"polybench:interpreter/pyinit.py": 5,
55
"polybench:interpreter/deltablue.py": 3,
66
"polybench:interpreter/fibonacci.py": 0,

0 commit comments

Comments
 (0)