diff options
author | Paweł Bylica <chfast@gmail.com> | 2016-12-24 00:42:17 +0800 |
---|---|---|
committer | Paweł Bylica <chfast@gmail.com> | 2016-12-24 00:42:17 +0800 |
commit | 775f3e6dff734bd25b5b65609480bf9d434c8c07 (patch) | |
tree | 20ce2930161b606b1f348d4f46db82029d01205a /src/VMTestsFiller/loop-mul.sol | |
parent | b364958d2f4828ac9165ae90eade97d57a52ecba (diff) | |
download | dexon-tests-775f3e6dff734bd25b5b65609480bf9d434c8c07.tar dexon-tests-775f3e6dff734bd25b5b65609480bf9d434c8c07.tar.gz dexon-tests-775f3e6dff734bd25b5b65609480bf9d434c8c07.tar.bz2 dexon-tests-775f3e6dff734bd25b5b65609480bf9d434c8c07.tar.lz dexon-tests-775f3e6dff734bd25b5b65609480bf9d434c8c07.tar.xz dexon-tests-775f3e6dff734bd25b5b65609480bf9d434c8c07.tar.zst dexon-tests-775f3e6dff734bd25b5b65609480bf9d434c8c07.zip |
Add performance VM tests for MULMOD
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; + } +} |