mirror of
https://github.com/pezkuwichain/revive.git
synced 2026-06-21 16:11:03 +00:00
Integrate benchmarks and differential tests against an EVM interpreter (#7)
This commit is contained in:
@@ -0,0 +1,7 @@
|
||||
// SPDX-License-Identifier: MIT
|
||||
|
||||
pragma solidity ^0.8.24;
|
||||
|
||||
contract Baseline {
|
||||
function baseline() public payable {}
|
||||
}
|
||||
@@ -1,4 +1,5 @@
|
||||
// SPDX-License-Identifier: MIT
|
||||
|
||||
pragma solidity ^0.8.24;
|
||||
|
||||
contract Computation {
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
// SPDX-License-Identifier: UNLICENSED
|
||||
|
||||
pragma solidity ^0.8.24;
|
||||
|
||||
// https://medium.com/coinmonks/fibonacci-in-solidity-8477d907e22a
|
||||
|
||||
contract FibonacciRecursive {
|
||||
@@ -24,9 +26,11 @@ contract FibonacciIterative {
|
||||
uint a = 1;
|
||||
b = 1;
|
||||
for (uint i = 2; i < n; i++) {
|
||||
uint c = a + b;
|
||||
a = b;
|
||||
b = c;
|
||||
unchecked {
|
||||
uint c = a + b;
|
||||
a = b;
|
||||
b = c;
|
||||
}
|
||||
}
|
||||
return b;
|
||||
}
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
// SPDX-License-Identifier: MIT
|
||||
|
||||
pragma solidity ^0.8.24;
|
||||
|
||||
contract MSize {
|
||||
uint[] public data;
|
||||
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
// SPDX-License-Identifier: MIT
|
||||
|
||||
pragma solidity ^0.8.24;
|
||||
|
||||
contract Value {
|
||||
function value() public payable returns (uint ret) {
|
||||
ret = msg.value;
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
// SPDX-License-Identifier: MIT
|
||||
|
||||
pragma solidity ^0.8.24;
|
||||
|
||||
contract MStore8 {
|
||||
function mStore8(uint value) public pure returns (uint256 word) {
|
||||
assembly {
|
||||
|
||||
Reference in New Issue
Block a user