- Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathBench.java
More file actions
Latest commit
12 lines (11 loc) · 492 Bytes
/
Copy pathBench.java
File metadata and controls
12 lines (11 loc) · 492 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
publicclassBench {
publicstaticvoidmain(String[] args) throwsException {
Interpreteri = newInterpreter();
i.execute(
"let ack = fn (m, n) => if (m == 0) then (n + 1) else (if (n == 0) then (ack(m - 1, 1)) else (ack(m - 1, ack(m, n - 1))))");
longt1 = System.currentTimeMillis();
i.execute("ack(3, 8)");
longt2 = System.currentTimeMillis();
System.out.println(String.format("Time taken: %d ms", t2 - t1));
}
}