Skip to content

Instantly share code, notes, and snippets.

@davidyuk
Created January 24, 2018 16:29
Show Gist options
  • Save davidyuk/56f4ff5abf365b35a9935abaafe751fd to your computer and use it in GitHub Desktop.
Save davidyuk/56f4ff5abf365b35a9935abaafe751fd to your computer and use it in GitHub Desktop.
aepp-response-contracts performance-tests
$ truffle test
Compiling ./contracts/BubbleSort.sol...
Compiling ./contracts/RewriteMin.sol...
Compiling ./contracts/RewriteMinPreCalculated.sol...
Compiling ./contracts/Simplest.sol...
Contract: Simplest
Simplest gas usage is 62064
Overall gas usage is 27928800
Transaction amount per test is 450
✓ Simplest (510ms)
BubbleSort, the same amount
gas 19772489, 29%, min gas 43189, max gas 133620
133620, 122677, 110853, 99029, 87205, 43189, 43189, 43189
✓ BubbleSort, the same amount (17167ms)
BubbleSort, increasing amount
gas 46791416, -68%, min gas 103620, max gas 133620
133620, 133620, 133620, 133620, 133620, 103620, 103620, 103620
✓ BubbleSort, increasing amount (35940ms)
BubbleSort, random amount
gas 20554564, 26%, min gas 43189, max gas 133684
133684, 133684, 133684, 122741, 133684, 43253, 43253, 57269
✓ BubbleSort, random amount (16378ms)
RewriteMin, the same amount
gas 23005427, 18%, min gas 50674, max gas 91101
91093, 91101, 91101, 91101, 91101, 50674, 50674, 50674
✓ RewriteMin, the same amount (23228ms)
RewriteMin, increasing amount
gas 27657146, 1%, min gas 61093, max gas 91101
91093, 91101, 91101, 91101, 91101, 61093, 61101, 61101
✓ RewriteMin, increasing amount (24737ms)
RewriteMin, random amount
gas 23260037, 17%, min gas 50674, max gas 91181
91157, 91165, 91173, 91181, 91181, 50690, 61173, 61173
✓ RewriteMin, random amount (21964ms)
RewriteMinPreCalculated, the same amount
gas 19633672, 30%, min gas 43046, max gas 110642
110642, 95642, 95642, 95642, 80634, 43046, 43046, 43046
✓ RewriteMinPreCalculated, the same amount (14997ms)
RewriteMinPreCalculated, increasing amount
gas 29700596, -6%, min gas 50634, max gas 110642
110642, 95642, 95642, 95642, 80634, 80642, 65642, 65642
✓ RewriteMinPreCalculated, increasing amount (25841ms)
RewriteMinPreCalculated, random amount
gas 20235500, 28%, min gas 43046, max gas 110706
110706, 95714, 95714, 95714, 95706, 65706, 43046, 50698
✓ RewriteMinPreCalculated, random amount (16290ms)
10 passing (3m)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment