Skip to content

Commit a1edbca

Browse files
committed
Add richards3 Java Python interop benchmark
1 parent 50b7adc commit a1edbca

File tree

3 files changed

+602
-0
lines changed

3 files changed

+602
-0
lines changed

graalpython/com.oracle.graal.python.benchmarks/java/com/oracle/graal/python/benchmarks/interop/BenchRunner.java

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -106,6 +106,14 @@ public static void main(String[] args) throws RunnerException {
106106
new Runner(opt, new BenchOutputFormat(System.out, VerboseMode.SILENT, benchName)).run();
107107
}
108108

109+
protected static Value get(Value a, int i) {
110+
return a.getArrayElement(i);
111+
}
112+
113+
protected static void set(Value a, int i, Object v) {
114+
a.setArrayElement(i, v);
115+
}
116+
109117
protected static double getd(Value a, int i) {
110118
return a.getArrayElement(i).asDouble();
111119
}

0 commit comments

Comments
 (0)