Browse Source

Merge pull request #1068 from imapp-pl/pr/performance_tests

ManyFunctions performance test
cl-refactor
Gav Wood 10 years ago
parent
commit
67b4d80477
  1. 1513
      test/ManyFunctions.sol
  2. 24
      test/ManyFunctionsGenerator.py
  3. 29
      test/vmPerformanceTestFiller.json

1513
test/ManyFunctions.sol

File diff suppressed because it is too large

24
test/ManyFunctionsGenerator.py

@ -0,0 +1,24 @@
n = 100
splitNumBegin = 128 - (n / 2)
i = 1
template = """
function right{0}(uint seed) returns (uint) {{
var r = nextRand(seed);
if (r >= 2**{2})
return right{1}(r);
return left{1}(r);
}}
function left{0}(uint seed) returns (uint) {{
var r = nextRand(nextRand(seed));
if (r >= 2**{2})
return left{1}(r);
return right{1}(r);
}}
"""
for i in range(1, n):
print template.format(i, i + 1, i + splitNumBegin)

29
test/vmPerformanceTestFiller.json

File diff suppressed because one or more lines are too long
Loading…
Cancel
Save