add efib benchmark
This commit is contained in:
parent
0dea4e86ec
commit
9d6576aaeb
|
@ -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;
|
|
@ -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)
|
|
@ -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"
|
Loading…
Reference in New Issue