Integrate benchmarks and differential tests against an EVM interpreter (#7)

This commit is contained in:
Cyrill Leutwiler
2024-04-24 18:51:19 +02:00
parent bd10742ef8
commit df8ebb61ec
27 changed files with 1567 additions and 383 deletions
@@ -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 {
+7 -3
View File
@@ -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;
}
+2
View File
@@ -1,5 +1,7 @@
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.24;
contract MSize {
uint[] public data;
+2
View File
@@ -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;
+2
View File
@@ -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 {