Skip to content

Commit

Permalink
Add benchmark program
Browse files Browse the repository at this point in the history
  • Loading branch information
fmoletta committed Oct 4, 2023
1 parent 2d34a34 commit 82ddc91
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 1 deletion.
2 changes: 1 addition & 1 deletion cairo_programs/benchmarks/fibonacci_100k.cairo
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,4 @@ func fib(first_element, second_element, n) -> (res: felt) {

tempvar y = first_element + second_element;
return fib(second_element, y, n - 1);
}
}
14 changes: 14 additions & 0 deletions cairo_programs/benchmarks/fibonacci_500k.cairo
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
func main() {
fib(1, 1, 500000);

ret;
}

func fib(first_element, second_element, n) -> (res: felt) {
if (n == 0) {
return (second_element,);
}

tempvar y = first_element + second_element;
return fib(second_element, y, n - 1);
}

0 comments on commit 82ddc91

Please sign in to comment.