summaryrefslogtreecommitdiffstats
path: root/runtime/bench2/var_bench
diff options
context:
space:
mode:
Diffstat (limited to 'runtime/bench2/var_bench')
-rwxr-xr-xruntime/bench2/var_bench17
1 files changed, 17 insertions, 0 deletions
diff --git a/runtime/bench2/var_bench b/runtime/bench2/var_bench
new file mode 100755
index 00000000..a45d9170
--- /dev/null
+++ b/runtime/bench2/var_bench
@@ -0,0 +1,17 @@
+#!/usr/bin/env ruby
+load './bench.rb'
+
+# This is a test of the translator's ability to detect
+# when variables are never modified and to optimize
+# reading of them.
+
+["var.st","const.st"].each do |file|
+ File.open(file,"r") do |f|
+ desc = f.gets.sub(/^#/,'').strip
+ test = Stapbench.new(desc)
+ test.file = file
+ test.run
+ test.print
+ end
+end
+