Commit 0eb9eb63 authored by Etienne Renault's avatar Etienne Renault
Browse files

benchs: fix example for blackbox

Commit 4536a3ae modifies (significantly) the size of the
state space. Consequently the current benchmark has been
adapted to run on a reasonnable computer.

* benchs/sqrt_prime_fibo.go: Here.
parent a8b459a5
......@@ -15,7 +15,6 @@ func compute1(n int) int {
tmp := num % i
if tmp == 0 {
is_prime = 0
break
}
}
......@@ -53,7 +52,6 @@ func compute_main_1(n int) int {
tmp := num % i
if tmp == 0 {
is_prime = 0
break
}
}
......@@ -91,7 +89,6 @@ func compute_main_2(n int) int {
tmp := num % i
if tmp == 0 {
is_prime = 0
break
}
}
......@@ -129,7 +126,6 @@ func compute_main_3(n int) int {
tmp := num % i
if tmp == 0 {
is_prime = 0
break
}
}
......@@ -167,7 +163,6 @@ func compute_main_4(n int) int {
tmp := num % i
if tmp == 0 {
is_prime = 0
break
}
}
......@@ -205,7 +200,6 @@ func compute_main_5(n int) int {
tmp := num % i
if tmp == 0 {
is_prime = 0
break
}
}
......@@ -243,7 +237,6 @@ func compute_main_6(n int) int {
tmp := num % i
if tmp == 0 {
is_prime = 0
break
}
}
......@@ -281,7 +274,6 @@ func compute_main_7(n int) int {
tmp := num % i
if tmp == 0 {
is_prime = 0
break
}
}
......@@ -319,7 +311,6 @@ func compute_main_8(n int) int {
tmp := num % i
if tmp == 0 {
is_prime = 0
break
}
}
......@@ -357,7 +348,6 @@ func compute_main_9(n int) int {
tmp := num % i
if tmp == 0 {
is_prime = 0
break
}
}
......@@ -395,7 +385,6 @@ func compute_main_10(n int) int {
tmp := num % i
if tmp == 0 {
is_prime = 0
break
}
}
......@@ -433,7 +422,6 @@ func compute_main_11(n int) int {
tmp := num % i
if tmp == 0 {
is_prime = 0
break
}
}
......@@ -471,7 +459,6 @@ func compute_main_12(n int) int {
tmp := num % i
if tmp == 0 {
is_prime = 0
break
}
}
......@@ -509,7 +496,6 @@ func compute_main_13(n int) int {
tmp := num % i
if tmp == 0 {
is_prime = 0
break
}
}
......@@ -547,7 +533,6 @@ func compute_main_14(n int) int {
tmp := num % i
if tmp == 0 {
is_prime = 0
break
}
}
......@@ -585,7 +570,6 @@ func compute_main_15(n int) int {
tmp := num % i
if tmp == 0 {
is_prime = 0
break
}
}
......@@ -623,7 +607,6 @@ func compute_main_16(n int) int {
tmp := num % i
if tmp == 0 {
is_prime = 0
break
}
}
......@@ -661,7 +644,6 @@ func compute_main_17(n int) int {
tmp := num % i
if tmp == 0 {
is_prime = 0
break
}
}
......@@ -699,7 +681,6 @@ func compute_main_18(n int) int {
tmp := num % i
if tmp == 0 {
is_prime = 0
break
}
}
......@@ -737,7 +718,6 @@ func compute_main_19(n int) int {
tmp := num % i
if tmp == 0 {
is_prime = 0
break
}
}
......@@ -775,957 +755,6 @@ func compute_main_20(n int) int {
tmp := num % i
if tmp == 0 {
is_prime = 0
break
}
}
if is_prime == 1 {
// Base cases
if num == 0 || num == 1 {
return num
}
// Staring from 1, try all numbers until
// i*i is greater than or equal to num.
i := 1
result := 1
for result <= num {
i = i + 1
result = i * i
}
return i - 1
}
return 0
}
func compute_main_21(n int) int {
n0 := 0
n1 := 1
for i := 0; i < n; i++ {
n2 := n0 + n1
n0 = n1
n1 = n2
}
num := n1
is_prime := 1
for i := 2; i < num; i++ {
tmp := num % i
if tmp == 0 {
is_prime = 0
break
}
}
if is_prime == 1 {
// Base cases
if num == 0 || num == 1 {
return num
}
// Staring from 1, try all numbers until
// i*i is greater than or equal to num.
i := 1
result := 1
for result <= num {
i = i + 1
result = i * i
}
return i - 1
}
return 0
}
func compute_main_22(n int) int {
n0 := 0
n1 := 1
for i := 0; i < n; i++ {
n2 := n0 + n1
n0 = n1
n1 = n2
}
num := n1
is_prime := 1
for i := 2; i < num; i++ {
tmp := num % i
if tmp == 0 {
is_prime = 0
break
}
}
if is_prime == 1 {
// Base cases
if num == 0 || num == 1 {
return num
}
// Staring from 1, try all numbers until
// i*i is greater than or equal to num.
i := 1
result := 1
for result <= num {
i = i + 1
result = i * i
}
return i - 1
}
return 0
}
func compute_main_23(n int) int {
n0 := 0
n1 := 1
for i := 0; i < n; i++ {
n2 := n0 + n1
n0 = n1
n1 = n2
}
num := n1
is_prime := 1
for i := 2; i < num; i++ {
tmp := num % i
if tmp == 0 {
is_prime = 0
break
}
}
if is_prime == 1 {
// Base cases
if num == 0 || num == 1 {
return num
}
// Staring from 1, try all numbers until
// i*i is greater than or equal to num.
i := 1
result := 1
for result <= num {
i = i + 1
result = i * i
}
return i - 1
}
return 0
}
func compute_main_24(n int) int {
n0 := 0
n1 := 1
for i := 0; i < n; i++ {
n2 := n0 + n1
n0 = n1
n1 = n2
}
num := n1
is_prime := 1
for i := 2; i < num; i++ {
tmp := num % i
if tmp == 0 {
is_prime = 0
break
}
}
if is_prime == 1 {
// Base cases
if num == 0 || num == 1 {
return num
}
// Staring from 1, try all numbers until
// i*i is greater than or equal to num.
i := 1
result := 1
for result <= num {
i = i + 1
result = i * i
}
return i - 1
}
return 0
}
func compute_main_25(n int) int {
n0 := 0
n1 := 1
for i := 0; i < n; i++ {
n2 := n0 + n1
n0 = n1
n1 = n2
}
num := n1
is_prime := 1
for i := 2; i < num; i++ {
tmp := num % i
if tmp == 0 {
is_prime = 0
break
}
}
if is_prime == 1 {
// Base cases
if num == 0 || num == 1 {
return num
}
// Staring from 1, try all numbers until
// i*i is greater than or equal to num.
i := 1
result := 1
for result <= num {
i = i + 1
result = i * i
}
return i - 1
}
return 0
}
func compute_main_26(n int) int {
n0 := 0
n1 := 1
for i := 0; i < n; i++ {
n2 := n0 + n1
n0 = n1
n1 = n2
}
num := n1
is_prime := 1
for i := 2; i < num; i++ {
tmp := num % i
if tmp == 0 {
is_prime = 0
break
}
}
if is_prime == 1 {
// Base cases
if num == 0 || num == 1 {
return num
}
// Staring from 1, try all numbers until
// i*i is greater than or equal to num.
i := 1
result := 1
for result <= num {
i = i + 1
result = i * i
}
return i - 1
}
return 0
}
func compute_main_27(n int) int {
n0 := 0
n1 := 1
for i := 0; i < n; i++ {
n2 := n0 + n1
n0 = n1
n1 = n2
}
num := n1
is_prime := 1
for i := 2; i < num; i++ {
tmp := num % i
if tmp == 0 {
is_prime = 0
break
}
}
if is_prime == 1 {
// Base cases
if num == 0 || num == 1 {
return num
}
// Staring from 1, try all numbers until
// i*i is greater than or equal to num.
i := 1
result := 1
for result <= num {
i = i + 1
result = i * i
}
return i - 1
}
return 0
}
func compute_main_28(n int) int {
n0 := 0
n1 := 1
for i := 0; i < n; i++ {
n2 := n0 + n1
n0 = n1
n1 = n2
}
num := n1
is_prime := 1
for i := 2; i < num; i++ {
tmp := num % i
if tmp == 0 {
is_prime = 0
break
}
}
if is_prime == 1 {
// Base cases
if num == 0 || num == 1 {
return num
}
// Staring from 1, try all numbers until
// i*i is greater than or equal to num.
i := 1
result := 1
for result <= num {
i = i + 1
result = i * i
}
return i - 1
}
return 0
}
func compute_main_29(n int) int {
n0 := 0
n1 := 1
for i := 0; i < n; i++ {
n2 := n0 + n1
n0 = n1
n1 = n2
}
num := n1
is_prime := 1
for i := 2; i < num; i++ {
tmp := num % i
if tmp == 0 {
is_prime = 0
break
}
}
if is_prime == 1 {
// Base cases
if num == 0 || num == 1 {
return num
}
// Staring from 1, try all numbers until
// i*i is greater than or equal to num.
i := 1
result := 1
for result <= num {
i = i + 1
result = i * i
}
return i - 1
}
return 0
}
func compute_main_30(n int) int {
n0 := 0
n1 := 1
for i := 0; i < n; i++ {
n2 := n0 + n1
n0 = n1
n1 = n2
}
num := n1
is_prime := 1
for i := 2; i < num; i++ {
tmp := num % i
if tmp == 0 {
is_prime = 0
break
}
}
if is_prime == 1 {
// Base cases
if num == 0 || num == 1 {
return num
}
// Staring from 1, try all numbers until
// i*i is greater than or equal to num.
i := 1
result := 1
for result <= num {
i = i + 1
result = i * i
}
return i - 1
}
return 0
}
func compute_main_31(n int) int {
n0 := 0
n1 := 1
for i := 0; i < n; i++ {
n2 := n0 + n1
n0 = n1
n1 = n2
}
num := n1
is_prime := 1
for i := 2; i < num; i++ {
tmp := num % i
if tmp == 0 {
is_prime = 0
break
}
}
if is_prime == 1 {
// Base cases
if num == 0 || num == 1 {
return num
}
// Staring from 1, try all numbers until
// i*i is greater than or equal to num.
i := 1
result := 1
for result <= num {
i = i + 1
result = i * i
}
return i - 1
}
return 0
}
func compute_main_32(n int) int {
n0 := 0
n1 := 1
for i := 0; i < n; i++ {
n2 := n0 + n1
n0 = n1
n1 = n2
}
num := n1
is_prime := 1
for i := 2; i < num; i++ {
tmp := num % i
if tmp == 0 {
is_prime = 0
break
}
}
if is_prime == 1 {
// Base cases
if num == 0 || num == 1 {
return num
}
// Staring from 1, try all numbers until
// i*i is greater than or equal to num.
i := 1
result := 1
for result <= num {
i = i + 1
result = i * i
}
return i - 1
}
return 0
}
func compute_main_33(n int) int {
n0 := 0
n1 := 1
for i := 0; i < n; i++ {
n2 := n0 + n1
n0 = n1
n1 = n2
}