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

[EraVM] Do not set Uses=[Flags] unconditionally in JCl #558

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

atrosinenko
Copy link
Collaborator

No description provided.

@atrosinenko atrosinenko requested review from asl and akiramenai May 21, 2024 16:53
Copy link

Benchmark results:

╔═╡ Size (-%) ╞════════════════╡ All M3B3 ╞═╗
║ Mean                                0.000 ║
║ Best                                0.000 ║
║ Worst                               0.000 ║
║ Total                               0.000 ║
╠═╡ Cycles (-%) ╞══════════════╡ All M3B3 ╞═╣
║ Mean                                0.000 ║
║ Best                                0.000 ║
║ Worst                               0.000 ║
║ Total                               0.000 ║
╠═╡ Ergs (-%) ╞════════════════╡ All M3B3 ╞═╣
║ Mean                                0.000 ║
║ Best                                0.000 ║
║ Worst                               0.000 ║
║ Total                               0.000 ║
╚═══════════════════════════════════════════╝

╔═╡ Size (-%) ╞════════════════╡ All MzB3 ╞═╗
║ Mean                                0.000 ║
║ Best                                0.000 ║
║ Worst                               0.000 ║
║ Total                               0.000 ║
╠═╡ Cycles (-%) ╞══════════════╡ All MzB3 ╞═╣
║ Mean                                0.000 ║
║ Best                                0.000 ║
║ Worst                               0.000 ║
║ Total                               0.000 ║
╠═╡ Ergs (-%) ╞════════════════╡ All MzB3 ╞═╣
║ Mean                                0.000 ║
║ Best                                0.000 ║
║ Worst                               0.000 ║
║ Total                               0.000 ║
╚═══════════════════════════════════════════╝

╔═╡ Size (-%) ╞═════╡ EVMInterpreter M3B3 ╞═╗
║ Mean                                0.000 ║
║ Best                                0.000 ║
║ Worst                               0.000 ║
║ Total                               0.000 ║
╠═╡ Cycles (-%) ╞═══╡ EVMInterpreter M3B3 ╞═╣
║ Mean                                0.000 ║
║ Best                                0.000 ║
║ Worst                               0.000 ║
║ Total                               0.000 ║
╠═╡ Ergs (-%) ╞═════╡ EVMInterpreter M3B3 ╞═╣
║ Mean                                0.000 ║
║ Best                                0.000 ║
║ Worst                               0.000 ║
║ Total                               0.000 ║
╠═╡ Ergs/gas ╞══════╡ EVMInterpreter M3B3 ╞═╣
║ ADD                                67.667 ║
║ MUL                                39.400 ║
║ SUB                                67.667 ║
║ DIV                                47.800 ║
║ SDIV                               64.600 ║
║ MOD                                46.600 ║
║ SMOD                               62.200 ║
║ ADDMOD                             39.000 ║
║ MULMOD                             36.000 ║
║ EXP                                 9.283 ║
║ SIGNEXTEND                         45.400 ║
║ LT                                 71.667 ║
║ GT                                 71.667 ║
║ SLT                                95.667 ║
║ SGT                                93.667 ║
║ EQ                                 71.667 ║
║ ISZERO                             63.333 ║
║ AND                                65.667 ║
║ OR                                 67.667 ║
║ XOR                                67.667 ║
║ NOT                                59.333 ║
║ BYTE                               75.667 ║
║ SHL                                73.667 ║
║ SHR                                71.667 ║
║ SAR                                89.667 ║
║ SGT                                93.667 ║
║ SHA3                               27.139 ║
║ ADDRESS                            91.000 ║
║ BALANCE                            73.180 ║
║ ORIGIN                           2852.000 ║
║ CALLER                             91.000 ║
║ CALLVALUE                          91.000 ║
║ CALLDATALOAD                       61.667 ║
║ CALLDATASIZE                       91.500 ║
║ CALLDATACOPY                       57.889 ║
║ CODESIZE                           88.500 ║
║ CODECOPY                          108.667 ║
║ GASPRICE                         2846.000 ║
║ EXTCODESIZE                         5.149 ║
║ EXTCODECOPY                         4.667 ║
║ RETURNDATASIZE                     89.000 ║
║ RETURNDATACOPY                     55.889 ║
║ EXTCODEHASH                         2.687 ║
║ BLOCKHASH                         244.450 ║
║ COINBASE                         2849.000 ║
║ TIMESTAMP                        2843.000 ║
║ NUMBER                           2843.000 ║
║ PREVRANDAO                       2843.000 ║
║ GASLIMIT                         2849.000 ║
║ CHAINID                          2837.000 ║
║ SELFBALANCE                       640.200 ║
║ BASEFEE                          2840.000 ║
║ POP                                79.000 ║
║ MLOAD                              43.667 ║
║ MSTORE                             44.333 ║
║ MSTORE8                            47.111 ║
║ SLOAD                               5.766 ║
║ SSTORE                              0.621 ║
║ JUMP                               37.333 ║
║ JUMPI                              32.818 ║
║ PC                                 91.500 ║
║ MSIZE                             101.000 ║
║ GAS                                85.500 ║
║ JUMPDEST                          122.000 ║
║ PUSH0                              88.500 ║
║ PUSH1                              75.333 ║
║ PUSH2                              91.667 ║
║ PUSH4                             150.333 ║
║ PUSH5                             170.667 ║
║ PUSH6                             191.000 ║
║ PUSH7                             211.333 ║
║ PUSH8                             231.667 ║
║ PUSH9                             252.000 ║
║ PUSH10                            272.333 ║
║ PUSH11                            290.667 ║
║ PUSH12                            313.000 ║
║ PUSH13                            333.333 ║
║ PUSH14                            343.333 ║
║ PUSH15                            392.667 ║
║ PUSH16                            413.000 ║
║ PUSH17                            433.333 ║
║ PUSH18                            453.667 ║
║ PUSH19                            474.000 ║
║ PUSH20                            494.333 ║
║ PUSH21                            514.667 ║
║ PUSH22                            535.000 ║
║ PUSH23                            555.333 ║
║ PUSH24                            575.667 ║
║ PUSH25                            596.000 ║
║ PUSH26                            616.333 ║
║ PUSH27                            636.667 ║
║ PUSH28                            657.000 ║
║ PUSH29                            677.333 ║
║ PUSH30                            681.333 ║
║ PUSH31                            758.667 ║
║ PUSH32                            779.000 ║
║ DUP1                               61.333 ║
║ DUP2                               65.333 ║
║ DUP3                               65.333 ║
║ DUP4                               65.333 ║
║ DUP5                               65.333 ║
║ DUP6                               65.333 ║
║ DUP7                               65.333 ║
║ DUP8                               65.333 ║
║ DUP9                               65.333 ║
║ DUP10                              65.333 ║
║ DUP11                              65.333 ║
║ DUP12                              65.333 ║
║ DUP13                              63.333 ║
║ DUP14                              65.333 ║
║ DUP15                              65.333 ║
║ DUP16                              65.333 ║
║ SWAP1                              66.000 ║
║ SWAP2                              66.000 ║
║ SWAP3                              66.000 ║
║ SWAP4                              66.000 ║
║ SWAP5                              66.000 ║
║ SWAP6                              66.000 ║
║ SWAP7                              66.000 ║
║ SWAP8                              66.000 ║
║ SWAP9                              66.000 ║
║ SWAP10                             66.000 ║
║ SWAP11                             64.000 ║
║ SWAP12                             66.000 ║
║ SWAP13                             66.000 ║
║ SWAP14                             66.000 ║
║ SWAP15                             66.000 ║
║ SWAP16                             66.000 ║
║ CREATE                              5.046 ║
║ CALL                               56.371 ║
║ RETURN                                inf ║
║ DELEGATECALL                       52.286 ║
║ STATICCALL                         53.248 ║
║ CREATE2                             7.067 ║
║ REVERT                                inf ║
╠═╡ Ergs/gas (-%) ╞═╡ EVMInterpreter M3B3 ╞═╣
╚═══════════════════════════════════════════╝

╔═╡ Size (-%) ╞═════╡ EVMInterpreter MzB3 ╞═╗
║ Mean                                0.000 ║
║ Best                                0.000 ║
║ Worst                               0.000 ║
║ Total                               0.000 ║
╠═╡ Cycles (-%) ╞═══╡ EVMInterpreter MzB3 ╞═╣
║ Mean                                0.000 ║
║ Best                                0.000 ║
║ Worst                               0.000 ║
║ Total                               0.000 ║
╠═╡ Ergs (-%) ╞═════╡ EVMInterpreter MzB3 ╞═╣
║ Mean                                0.000 ║
║ Best                                0.000 ║
║ Worst                               0.000 ║
║ Total                               0.000 ║
╚═══════════════════════════════════════════╝

╔═╡ Size (-%) ╞════════╡ Precompiles M3B3 ╞═╗
║ Mean                                0.000 ║
║ Best                                0.000 ║
║ Worst                               0.000 ║
║ Total                               0.000 ║
╠═╡ Cycles (-%) ╞══════╡ Precompiles M3B3 ╞═╣
║ Mean                                0.000 ║
║ Best                                0.000 ║
║ Worst                               0.000 ║
║ Total                               0.000 ║
╠═╡ Ergs (-%) ╞════════╡ Precompiles M3B3 ╞═╣
║ Mean                                0.000 ║
║ Best                                0.000 ║
║ Worst                               0.000 ║
║ Total                               0.000 ║
╚═══════════════════════════════════════════╝

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

╔═╡ Size (-%) ╞══════════╡ Real life M3B3 ╞═╗
║ Mean                                0.000 ║
║ Best                                0.000 ║
║ Worst                               0.000 ║
║ Total                               0.000 ║
╠═╡ Cycles (-%) ╞════════╡ Real life M3B3 ╞═╣
║ Mean                                0.000 ║
║ Best                                0.000 ║
║ Worst                               0.000 ║
║ Total                               0.000 ║
╠═╡ Ergs (-%) ╞══════════╡ Real life M3B3 ╞═╣
║ Mean                                0.000 ║
║ Best                                0.000 ║
║ Worst                               0.000 ║
║ Total                               0.000 ║
╚═══════════════════════════════════════════╝

╔═╡ Size (-%) ╞══════════╡ Real life MzB3 ╞═╗
║ Mean                                0.000 ║
║ Best                                0.000 ║
║ Worst                               0.000 ║
║ Total                               0.000 ║
╠═╡ Cycles (-%) ╞════════╡ Real life MzB3 ╞═╣
║ Mean                                0.000 ║
║ Best                                0.000 ║
║ Worst                               0.000 ║
║ Total                               0.000 ║
╠═╡ Ergs (-%) ╞══════════╡ Real life MzB3 ╞═╣
║ Mean                                0.000 ║
║ Best                                0.000 ║
║ Worst                               0.000 ║
║ Total                               0.000 ║
╚═══════════════════════════════════════════╝

@atrosinenko
Copy link
Collaborator Author

Hm, I tried to not update everything in one PR but then I spotted that it may be better to update J instruction here, too - otherwise it may handle JCl with COND_NONE case by itself.

@atrosinenko atrosinenko marked this pull request as draft May 23, 2024 09:53
@atrosinenko atrosinenko force-pushed the eravm-mc/refine-uses-flags branch from 9d80fd6 to c359618 Compare June 12, 2024 15:55
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