Skip to content

Commit

Permalink
even faster fastfib
Browse files Browse the repository at this point in the history
  • Loading branch information
reginaldford committed Feb 17, 2024
1 parent 939b1a6 commit 120c681
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions sms_src/examples/benchmark_fastfib.sms
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,7 @@
let f = (n) => {
if(n<5)
return first5[n];
let s2= f(n-2);
let s3= f(n-3);
let s4= f(n-4);

return 2*s3+s4+s2 ;
return 2 *f(n-3) + f(n-4) + f(n-2) ;
};

benchmark(:f(31));
Expand Down

0 comments on commit 120c681

Please sign in to comment.