Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[WIP] Inline farcall #669

Draft
wants to merge 4 commits into
base: main
Choose a base branch
from
Draft

[WIP] Inline farcall #669

wants to merge 4 commits into from

Conversation

akiramenai
Copy link
Collaborator

No description provided.

@akiramenai akiramenai marked this pull request as draft August 1, 2024 10:10
Copy link

github-actions bot commented Aug 1, 2024

Benchmark results default:

╔═╡ Size (-%) ╞════════════════╡ All M3B3 ╞═╗
║ Mean                                1.565 ║
║ Best                               30.769 ║
║ Worst                             -25.882 ║
║ Total                               1.413 ║
╠═╡ Cycles (-%) ╞══════════════╡ All M3B3 ╞═╣
║ Mean                                0.633 ║
║ Best                               31.250 ║
║ Worst                             -23.904 ║
║ Total                               1.243 ║
╠═╡ Ergs (-%) ╞════════════════╡ All M3B3 ╞═╣
║ Mean                                0.632 ║
║ Best                               15.301 ║
║ Worst                             -107.650 ║
║ Total                               0.000 ║
╚═══════════════════════════════════════════╝

╔═╡ Size (-%) ╞════════════════╡ All MzB3 ╞═╗
║ Mean                                1.565 ║
║ Best                               29.703 ║
║ Worst                             -20.513 ║
║ Total                               2.592 ║
╠═╡ Cycles (-%) ╞══════════════╡ All MzB3 ╞═╣
║ Mean                                0.633 ║
║ Best                               17.028 ║
║ Worst                             -28.386 ║
║ Total                               1.226 ║
╠═╡ Ergs (-%) ╞════════════════╡ All MzB3 ╞═╣
║ Mean                                0.633 ║
║ Best                               11.777 ║
║ Worst                             -102.656 ║
║ Total                               0.000 ║
╚═══════════════════════════════════════════╝

╔═╡ Size (-%) ╞═════╡ EVMInterpreter M3B3 ╞═╗
║ Mean                                0.000 ║
║ Best                                0.000 ║
║ Worst                               0.000 ║
║ Total                                 NaN ║
╠═╡ Cycles (-%) ╞═══╡ EVMInterpreter M3B3 ╞═╣
║ Mean                               -3.574 ║
║ Best                                9.059 ║
║ Worst                             -23.904 ║
║ Total                             -13.516 ║
╠═╡ Ergs (-%) ╞═════╡ EVMInterpreter M3B3 ╞═╣
║ Mean                               -1.466 ║
║ Best                                2.055 ║
║ Worst                              -9.073 ║
║ Total                              -1.777 ║
╠═╡ Ergs/gas ╞══════╡ EVMInterpreter M3B3 ╞═╣
║ ADD                                52.750 ║
║ MUL                                31.650 ║
║ SUB                                52.750 ║
║ DIV                                32.850 ║
║ SDIV                               48.450 ║
║ MOD                                32.850 ║
║ SMOD                               46.050 ║
║ ADDMOD                             26.656 ║
║ MULMOD                             28.156 ║
║ EXP                                 7.737 ║
║ SIGNEXTEND                         30.450 ║
║ LT                                 56.750 ║
║ GT                                 56.750 ║
║ SLT                                80.750 ║
║ SGT                                78.750 ║
║ EQ                                 54.750 ║
║ ISZERO                             50.417 ║
║ AND                                52.750 ║
║ OR                                 52.750 ║
║ XOR                                52.750 ║
║ NOT                                46.417 ║
║ BYTE                               60.750 ║
║ SHL                                56.750 ║
║ SHR                                58.750 ║
║ SAR                                74.750 ║
║ SGT                                78.750 ║
║ SHA3                               26.852 ║
║ ADDRESS                            71.812 ║
║ BALANCE                            70.940 ║
║ ORIGIN                           1322.375 ║
║ CALLER                             71.812 ║
║ CALLVALUE                          71.812 ║
║ CALLDATALOAD                       48.750 ║
║ CALLDATASIZE                       72.125 ║
║ CALLDATACOPY                       80.015 ║
║ CODESIZE                           69.625 ║
║ CODECOPY                          138.303 ║
║ GASPRICE                         1325.188 ║
║ EXTCODESIZE                         4.999 ║
║ EXTCODECOPY                         5.046 ║
║ RETURNDATASIZE                     70.500 ║
║ RETURNDATACOPY                     49.889 ║
║ EXTCODEHASH                         6.031 ║
║ BLOCKHASH                         238.319 ║
║ COINBASE                         1325.375 ║
║ TIMESTAMP                        1322.375 ║
║ NUMBER                           1322.375 ║
║ PREVRANDAO                       1322.375 ║
║ GASLIMIT                         1328.375 ║
║ CHAINID                          1322.375 ║
║ SELFBALANCE                       621.875 ║
║ BASEFEE                          1322.375 ║
║ POP                                56.625 ║
║ MLOAD                              73.533 ║
║ MSTORE                             71.705 ║
║ MSTORE8                            83.539 ║
║ SLOAD                              25.892 ║
║ SSTORE                              8.803 ║
║ JUMP                               26.444 ║
║ JUMPI                              24.455 ║
║ PC                                 72.312 ║
║ MSIZE                              78.812 ║
║ GAS                                66.312 ║
║ JUMPDEST                           89.625 ║
║ PUSH0                              63.312 ║
║ PUSH1                              53.958 ║
║ PUSH2                              57.375 ║
║ PUSH4                              60.208 ║
║ PUSH5                              61.625 ║
║ PUSH6                              63.042 ║
║ PUSH7                              64.458 ║
║ PUSH8                              65.875 ║
║ PUSH9                              67.292 ║
║ PUSH10                             68.708 ║
║ PUSH11                             70.125 ║
║ PUSH12                             71.542 ║
║ PUSH13                             72.958 ║
║ PUSH14                             74.375 ║
║ PUSH15                             75.792 ║
║ PUSH16                             77.208 ║
║ PUSH17                             78.625 ║
║ PUSH18                             80.042 ║
║ PUSH19                             81.458 ║
║ PUSH20                             82.875 ║
║ PUSH21                             84.292 ║
║ PUSH22                             85.708 ║
║ PUSH23                             87.125 ║
║ PUSH24                             88.542 ║
║ PUSH25                             89.958 ║
║ PUSH26                             91.375 ║
║ PUSH27                             92.792 ║
║ PUSH28                             94.208 ║
║ PUSH29                             95.625 ║
║ PUSH30                             97.042 ║
║ PUSH31                             98.458 ║
║ PUSH32                             97.875 ║
║ DUP1                               46.417 ║
║ DUP2                               50.417 ║
║ DUP3                               48.417 ║
║ DUP4                               50.417 ║
║ DUP5                               50.417 ║
║ DUP6                               50.417 ║
║ DUP7                               50.417 ║
║ DUP8                               50.417 ║
║ DUP9                               50.417 ║
║ DUP10                              50.417 ║
║ DUP11                              50.417 ║
║ DUP12                              50.417 ║
║ DUP13                              50.417 ║
║ DUP14                              50.417 ║
║ DUP15                              50.417 ║
║ DUP16                              50.417 ║
║ SWAP1                              57.083 ║
║ SWAP2                              57.083 ║
║ SWAP3                              57.083 ║
║ SWAP4                              57.083 ║
║ SWAP5                              55.083 ║
║ SWAP6                              57.083 ║
║ SWAP7                              57.083 ║
║ SWAP8                              57.083 ║
║ SWAP9                              57.083 ║
║ SWAP10                             57.083 ║
║ SWAP11                             57.083 ║
║ SWAP12                             57.083 ║
║ SWAP13                             57.083 ║
║ SWAP14                             57.083 ║
║ SWAP15                             57.083 ║
║ SWAP16                             57.083 ║
║ CALL                               56.757 ║
║ STATICCALL                         56.751 ║
║ DELEGATECALL                       55.791 ║
║ CREATE                              5.007 ║
║ CREATE2                             7.015 ║
║ RETURN                              1.000 ║
║ REVERT                              1.000 ║
╠═╡ Ergs/gas (-%) ╞═╡ EVMInterpreter M3B3 ╞═╣
║ ADD                               -23.392 ║
║ MUL                               -23.392 ║
║ SUB                               -23.392 ║
║ DIV                                -7.882 ║
║ SDIV                               -5.212 ║
║ MOD                                -7.882 ║
║ SMOD                               -5.498 ║
║ ADDMOD                             -9.219 ║
║ MULMOD                             -8.685 ║
║ EXP                                -4.034 ║
║ SIGNEXTEND                         -8.556 ║
║ LT                                -21.390 ║
║ GT                                -21.390 ║
║ SLT                               -14.134 ║
║ SGT                               -14.545 ║
║ EQ                                -17.112 ║
║ ISZERO                            -13.508 ║
║ AND                               -23.392 ║
║ OR                                -23.392 ║
║ XOR                               -23.392 ║
║ NOT                               -20.824 ║
║ BYTE                              -10.959 ║
║ SHL                               -21.390 ║
║ SHR                               -20.513 ║
║ SAR                                -8.727 ║
║ SGT                               -14.545 ║
║ SHA3                                4.926 ║
║ ADDRESS                           -33.449 ║
║ BALANCE                             3.263 ║
║ ORIGIN                              2.010 ║
║ CALLER                            -33.449 ║
║ CALLVALUE                         -33.449 ║
║ CALLDATALOAD                      -19.632 ║
║ CALLDATASIZE                      -33.256 ║
║ CALLDATACOPY                       -9.426 ║
║ CODESIZE                          -27.460 ║
║ CODECOPY                           -3.691 ║
║ GASPRICE                            2.006 ║
║ EXTCODESIZE                         2.520 ║
║ EXTCODECOPY                         2.581 ║
║ RETURNDATASIZE                    -34.286 ║
║ RETURNDATACOPY                    -10.319 ║
║ EXTCODEHASH                         2.826 ║
║ BLOCKHASH                           1.120 ║
║ COINBASE                            2.006 ║
║ TIMESTAMP                           2.010 ║
║ NUMBER                              2.010 ║
║ PREVRANDAO                          2.010 ║
║ GASLIMIT                            2.001 ║
║ CHAINID                             2.010 ║
║ SELFBALANCE                         3.154 ║
║ BASEFEE                             2.010 ║
║ POP                               -26.891 ║
║ MLOAD                             -14.199 ║
║ MSTORE                            -14.614 ║
║ MSTORE8                           -12.697 ║
║ SLOAD                               3.521 ║
║ SSTORE                              2.818 ║
║ JUMP                              -14.423 ║
║ JUMPI                             -12.552 ║
║ PC                                -33.142 ║
║ MSIZE                             -29.599 ║
║ GAS                               -29.233 ║
║ JUMPDEST                          -15.459 ║
║ PUSH0                             -23.386 ║
║ PUSH1                             -17.407 ║
║ PUSH2                             -16.203 ║
║ PUSH4                             -15.323 ║
║ PUSH5                             -14.918 ║
║ PUSH6                             -14.534 ║
║ PUSH7                             -14.170 ║
║ PUSH8                             -13.823 ║
║ PUSH9                             -13.493 ║
║ PUSH10                            -13.178 ║
║ PUSH11                            -12.877 ║
║ PUSH12                            -12.590 ║
║ PUSH13                            -12.316 ║
║ PUSH14                            -12.053 ║
║ PUSH15                            -11.801 ║
║ PUSH16                            -11.559 ║
║ PUSH17                            -11.327 ║
║ PUSH18                            -11.105 ║
║ PUSH19                            -10.891 ║
║ PUSH20                            -10.684 ║
║ PUSH21                            -10.486 ║
║ PUSH22                            -10.295 ║
║ PUSH23                            -10.111 ║
║ PUSH24                             -9.933 ║
║ PUSH25                             -9.761 ║
║ PUSH26                             -9.595 ║
║ PUSH27                             -9.435 ║
║ PUSH28                             -9.280 ║
║ PUSH29                             -9.130 ║
║ PUSH30                             -8.985 ║
║ PUSH31                             -8.844 ║
║ PUSH32                             -8.901 ║
║ DUP1                              -27.460 ║
║ DUP2                              -13.508 ║
║ DUP3                              -14.145 ║
║ DUP4                              -13.508 ║
║ DUP5                              -13.508 ║
║ DUP6                              -13.508 ║
║ DUP7                              -13.508 ║
║ DUP8                              -13.508 ║
║ DUP9                              -13.508 ║
║ DUP10                             -13.508 ║
║ DUP11                             -13.508 ║
║ DUP12                             -13.508 ║
║ DUP13                             -13.508 ║
║ DUP14                             -13.508 ║
║ DUP15                             -13.508 ║
║ DUP16                             -13.508 ║
║ SWAP1                             -21.239 ║
║ SWAP2                             -21.239 ║
║ SWAP3                             -21.239 ║
║ SWAP4                             -21.239 ║
║ SWAP5                             -22.181 ║
║ SWAP6                             -21.239 ║
║ SWAP7                             -21.239 ║
║ SWAP8                             -21.239 ║
║ SWAP9                             -21.239 ║
║ SWAP10                            -21.239 ║
║ SWAP11                            -21.239 ║
║ SWAP12                            -21.239 ║
║ SWAP13                            -21.239 ║
║ SWAP14                            -21.239 ║
║ SWAP15                            -21.239 ║
║ SWAP16                            -21.239 ║
║ CALL                               -1.030 ║
║ STATICCALL                         -1.038 ║
║ DELEGATECALL                       -1.063 ║
║ CREATE                              0.528 ║
║ CREATE2                             0.553 ║
╚═══════════════════════════════════════════╝

╔═╡ Size (-%) ╞═════╡ EVMInterpreter MzB3 ╞═╗
║ Mean                                0.000 ║
║ Best                                0.000 ║
║ Worst                               0.000 ║
║ Total                                 NaN ║
╠═╡ Cycles (-%) ╞═══╡ EVMInterpreter MzB3 ╞═╣
║ Mean                               -3.574 ║
║ Best                                9.059 ║
║ Worst                             -23.904 ║
║ Total                             -13.516 ║
╠═╡ Ergs (-%) ╞═════╡ EVMInterpreter MzB3 ╞═╣
║ Mean                               -1.466 ║
║ Best                                2.055 ║
║ Worst                              -9.073 ║
║ Total                              -1.777 ║
╚═══════════════════════════════════════════╝

╔═╡ Size (-%) ╞════════╡ Precompiles M3B3 ╞═╗
║ Mean                               -3.425 ║
║ Best                                0.576 ║
║ Worst                             -14.815 ║
║ Total                              -0.133 ║
╠═╡ Cycles (-%) ╞══════╡ Precompiles M3B3 ╞═╣
║ Mean                                3.521 ║
║ Best                                6.494 ║
║ Worst                              -2.151 ║
║ Total                               0.046 ║
╠═╡ Ergs (-%) ╞════════╡ Precompiles M3B3 ╞═╣
║ Mean                                0.768 ║
║ Best                                3.433 ║
║ Worst                              -1.993 ║
║ Total                               0.001 ║
╚═══════════════════════════════════════════╝

╔═╡ Size (-%) ╞════════╡ Precompiles MzB3 ╞═╗
║ Mean                                0.000 ║
║ Best                                0.000 ║
║ Worst                               0.000 ║
║ Total                               0.000 ║
╠═╡ Cycles (-%) ╞══════╡ Precompiles MzB3 ╞═╣
║ Mean                                3.641 ║
║ Best                                6.467 ║
║ Worst                               0.000 ║
║ Total                               0.045 ║
╠═╡ Ergs (-%) ╞════════╡ Precompiles MzB3 ╞═╣
║ Mean                                0.902 ║
║ Best                                3.306 ║
║ Worst                              -0.000 ║
║ Total                               0.001 ║
╚═══════════════════════════════════════════╝

╔═╡ Size (-%) ╞══════════╡ Real life M3B3 ╞═╗
║ Mean                                2.413 ║
║ Best                               10.256 ║
║ Worst                              -8.115 ║
║ Total                               0.977 ║
╠═╡ Cycles (-%) ╞════════╡ Real life M3B3 ╞═╣
║ Mean                                6.418 ║
║ Best                               10.277 ║
║ Worst                              -2.740 ║
║ Total                               2.955 ║
╠═╡ Ergs (-%) ╞══════════╡ Real life M3B3 ╞═╣
║ Mean                                1.197 ║
║ Best                                5.648 ║
║ Worst                              -0.251 ║
║ Total                               1.180 ║
╚═══════════════════════════════════════════╝

╔═╡ Size (-%) ╞══════════╡ Real life MzB3 ╞═╗
║ Mean                                1.436 ║
║ Best                                4.082 ║
║ Worst                               0.000 ║
║ Total                               1.270 ║
╠═╡ Cycles (-%) ╞════════╡ Real life MzB3 ╞═╣
║ Mean                                6.192 ║
║ Best                               11.345 ║
║ Worst                              -0.947 ║
║ Total                               2.239 ║
╠═╡ Ergs (-%) ╞══════════╡ Real life MzB3 ╞═╣
║ Mean                                1.185 ║
║ Best                                5.009 ║
║ Worst                              -0.736 ║
║ Total                               1.044 ║
╚═══════════════════════════════════════════╝

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant