Skip to content

Instantly share code, notes, and snippets.

@chfast
Last active August 29, 2015 14:15
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save chfast/b9871f4bddab05803199 to your computer and use it in GitHub Desktop.
Save chfast/b9871f4bddab05803199 to your computer and use it in GitHub Desktop.
PerformanceTester
contract PerformanceTester {
function ackermann(uint m, uint n) returns (uint) {
if (m == 0)
return n + 1;
if (n == 0)
return ackermann(m - 1, 1);
return ackermann(m - 1, ackermann(m, n - 1));
}
function fibonacci(uint n) returns (uint) {
if (n == 0 || n == 1)
return n;
return fibonacci(n - 1) + fibonacci(n - 2);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment