aboutsummaryrefslogtreecommitdiffstats
path: root/src/VMTestsFiller/performanceTester.sol
diff options
context:
space:
mode:
authorDimitry <dimitry@ethdev.com>2016-12-05 19:12:05 +0800
committerDimitry <dimitry@ethdev.com>2016-12-05 19:12:05 +0800
commite2a69159c863d810a368eda8aa417290d95dc52e (patch)
tree75da52555f6c077fdf580b24bcd8268c968da62e /src/VMTestsFiller/performanceTester.sol
parent35cfcf16190fc3e56ee11ead23452c633e2fca28 (diff)
downloadtangerine-tests-e2a69159c863d810a368eda8aa417290d95dc52e.tar
tangerine-tests-e2a69159c863d810a368eda8aa417290d95dc52e.tar.gz
tangerine-tests-e2a69159c863d810a368eda8aa417290d95dc52e.tar.bz2
tangerine-tests-e2a69159c863d810a368eda8aa417290d95dc52e.tar.lz
tangerine-tests-e2a69159c863d810a368eda8aa417290d95dc52e.tar.xz
tangerine-tests-e2a69159c863d810a368eda8aa417290d95dc52e.tar.zst
tangerine-tests-e2a69159c863d810a368eda8aa417290d95dc52e.zip
Test Fillers (Sources for the tests)
Diffstat (limited to 'src/VMTestsFiller/performanceTester.sol')
-rw-r--r--src/VMTestsFiller/performanceTester.sol17
1 files changed, 17 insertions, 0 deletions
diff --git a/src/VMTestsFiller/performanceTester.sol b/src/VMTestsFiller/performanceTester.sol
new file mode 100644
index 000000000..3b1202cea
--- /dev/null
+++ b/src/VMTestsFiller/performanceTester.sol
@@ -0,0 +1,17 @@
+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);
+ }
+} \ No newline at end of file