diff options
Diffstat (limited to 'src/VMTestsFiller/loop-mul.sol')
-rw-r--r-- | src/VMTestsFiller/loop-mul.sol | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/VMTestsFiller/loop-mul.sol b/src/VMTestsFiller/loop-mul.sol index e69de29bb..a7780c670 100644 --- a/src/VMTestsFiller/loop-mul.sol +++ b/src/VMTestsFiller/loop-mul.sol @@ -0,0 +1,12 @@ +pragma solidity ^0.4.0; + +contract MulPerformanceTester { + + function testMulMod(uint x, uint y, uint k, uint n) external returns (uint) { + var r = x; + for (uint i = 0; i < n; i += 1) { + r = mulmod(r, y, k); + } + return r; + } +} |