summaryrefslogtreecommitdiff
path: root/bench/runner.myr
diff options
context:
space:
mode:
authorOri Bernstein <ori@eigenstate.org>2014-08-15 15:13:44 -0400
committerOri Bernstein <ori@eigenstate.org>2014-08-15 15:13:44 -0400
commit437f6d851e88446fba90495a3175f02e8d3d390c (patch)
tree3bcb1e2b9c9e48e7547570b374c110faef8712d5 /bench/runner.myr
parenta5a4e162cec3bb59c7d88a703d45edc916392453 (diff)
downloadmc-437f6d851e88446fba90495a3175f02e8d3d390c.tar.gz
Add benchmarking runner and makefile.
Now you can do 'make bench', and see how fast Myrddin runs. Or at least the integer sorting bit. TODO: expand this so that you can see how it compares to previous results, and add benchmarks.
Diffstat (limited to 'bench/runner.myr')
-rw-r--r--bench/runner.myr23
1 files changed, 23 insertions, 0 deletions
diff --git a/bench/runner.myr b/bench/runner.myr
new file mode 100644
index 0000000..8ddc1de
--- /dev/null
+++ b/bench/runner.myr
@@ -0,0 +1,23 @@
+use std
+
+const Nsamp = 10
+
+const main = {args : byte[:][:]
+ for a in args
+ time(a)
+ ;;
+}
+
+const time = {a
+ var rusage
+ var t
+
+ for i = 0; i < Nsamp; i++
+ if !run(a, &rusage)
+ break
+ ;;
+ ;;
+}
+
+
+