add efib benchmark

This commit is contained in:
prod2 2022-01-29 03:29:52 +01:00
parent 0dea4e86ec
commit 9d6576aaeb
3 changed files with 39 additions and 0 deletions

13
benchmarks/efib.nds Normal file
View File

@ -0,0 +1,13 @@
var a = 0;
var b = 1;
var i = 1;
while (i < 300) {
var c = a + b;
a = b;
b = c;
i = i + 1;
};
print b;

13
benchmarks/efib.py Normal file
View File

@ -0,0 +1,13 @@
a = 0
b = 1
i = 1
while i < 300:
c = a + b
a = b
b = c
i = i + 1
print (b)

13
benchmarks/efib.sh Normal file
View File

@ -0,0 +1,13 @@
x=0
y=1
i=2
while [ $i -lt 300 ]
do
i=$(( $i + 1 ))
z=$(( $x + $y ))
x=$y
y=$z
done
echo "$y"