aboutsummaryrefslogtreecommitdiffstats
path: root/progs/bench/fib-iter.sy
diff options
context:
space:
mode:
Diffstat (limited to 'progs/bench/fib-iter.sy')
-rw-r--r--progs/bench/fib-iter.sy14
1 files changed, 14 insertions, 0 deletions
diff --git a/progs/bench/fib-iter.sy b/progs/bench/fib-iter.sy
new file mode 100644
index 0000000..b6ff3d8
--- /dev/null
+++ b/progs/bench/fib-iter.sy
@@ -0,0 +1,14 @@
+// A fibonacci implementation that is a little
+// less awefull. But we run it 10000 times instead.
+j := 0
+for , j < 10000, j = j + 1 {
+ a := 0
+ b := 1
+
+ for i := 0, i < 50, i = i + 1 {
+ c := a
+ a = b
+ b = c + b
+ }
+ a <=> 12586269025
+}