Skip to content

Instantly share code, notes, and snippets.

@gcolvin
Last active May 21, 2022
Embed
What would you like to do?
EVM opcode histogram
OP Count Total % Cum %
PUSH1 37,886,773 37,886,773 11.12% 11.12%
PUSH2 28,280,939 66,167,712 8.30% 19.43%
POP 24,003,852 90,171,564 7.05% 26.47%
JUMPDEST 22,374,953 112,546,517 6.57% 33.04%
SWAP1 18,110,085 130,656,602 5.32% 38.36%
DUP2 17,393,988 148,050,590 5.11% 43.47%
DUP1 16,132,946 164,183,536 4.74% 48.20%
JUMPI 14,963,477 179,147,013 4.39% 52.60%
ADD 14,842,987 193,990,000 4.36% 56.95%
DUP3 11,535,326 205,525,326 3.39% 60.34%
JUMP 11,389,635 216,914,961 3.34% 63.69%
MSTORE 9,670,872 226,585,833 2.84% 66.52%
SWAP2 8,981,871 235,567,704 2.64% 69.16%
ISZERO 8,942,301 244,510,005 2.63% 71.79%
AND 8,524,767 253,034,772 2.50% 74.29%
MLOAD 8,273,709 261,308,481 2.43% 76.72%
DUP4 8,229,450 269,537,931 2.42% 79.14%
PUSH4 5,247,460 274,785,391 1.54% 80.68%
SWAP3 4,761,206 279,546,597 1.40% 82.07%
DUP5 4,501,301 284,047,898 1.32% 83.40%
EQ 4,344,222 288,392,120 1.28% 84.67%
SUB 4,309,501 292,701,621 1.27% 85.94%
LT 4,244,704 296,946,325 1.25% 87.18%
PUSH20 2,921,374 299,867,699 0.86% 88.04%
DUP6 2,520,585 302,388,284 0.74% 88.78%
GT 2,336,817 304,725,101 0.69% 89.47%
SHL 2,079,572 306,804,673 0.61% 90.08%
SLOAD 2,030,795 308,835,468 0.60% 90.67%
MUL 1,899,487 310,734,955 0.56% 91.23%
CALLDATALOAD 1,882,752 312,617,707 0.55% 91.78%
PUSH32 1,818,938 314,436,645 0.53% 92.32%
SWAP4 1,792,003 316,228,648 0.53% 92.84%
DIV 1,774,991 318,003,639 0.52% 93.36%
MULMOD 1,626,978 319,630,617 0.48% 93.84%
KECCAK256 1,555,212 321,185,829 0.46% 94.30%
DUP7 1,492,987 322,678,816 0.44% 94.74%
ADDMOD 1,077,164 323,755,980 0.32% 95.05%
DUP8 1,027,167 324,783,147 0.30% 95.35%
CALLDATASIZE 1,000,684 325,783,831 0.29% 95.65%
SWAP5 937,056 326,720,887 0.28% 95.92%
DUP9 880,492 327,601,379 0.26% 96.18%
NOT 696,824 328,298,203 0.20% 96.39%
SSTORE 641,998 328,940,201 0.19% 96.58%
EXP 600,464 329,540,665 0.18% 96.75%
SHR 579,335 330,120,000 0.17% 96.92%
RETURNDATASIZE 566,117 330,686,117 0.17% 97.09%
CALLER 562,515 331,248,632 0.17% 97.25%
SWAP6 538,569 331,787,201 0.16% 97.41%
OR 512,794 332,299,995 0.15% 97.56%
CALLVALUE 492,019 332,792,014 0.14% 97.71%
DUP10 461,545 333,253,559 0.14% 97.84%
GAS 452,961 333,706,520 0.13% 97.97%
RETURN 387,141 334,093,661 0.11% 98.09%
PUSH14 378,201 334,471,862 0.11% 98.20%
PUSH8 345,608 334,817,470 0.10% 98.30%
DUP11 340,962 335,158,432 0.10% 98.40%
EXTCODESIZE 292,898 335,451,330 0.09% 98.49%
SWAP7 287,344 335,738,674 0.08% 98.57%
SLT 276,767 336,015,441 0.08% 98.65%
PUSH29 262,631 336,278,072 0.08% 98.73%
PUSH3 219,949 336,498,021 0.06% 98.79%
DUP12 212,946 336,710,967 0.06% 98.86%
CALL 204,402 336,915,369 0.06% 98.92%
CALLDATACOPY 203,797 337,119,166 0.06% 98.98%
BYTE 198,743 337,317,909 0.06% 99.04%
SWAP9 188,966 337,506,875 0.06% 99.09%
SWAP8 185,907 337,692,782 0.05% 99.15%
STATICCALL 179,330 337,872,112 0.05% 99.20%
LOG3 174,142 338,046,254 0.05% 99.25%
PUSH28 160,053 338,206,307 0.05% 99.30%
MSTORE8 156,972 338,363,279 0.05% 99.34%
DUP13 148,278 338,511,557 0.04% 99.39%
PUSH5 144,613 338,656,170 0.04% 99.43%
STOP 139,356 338,795,526 0.04% 99.47%
ADDRESS 134,443 338,929,969 0.04% 99.51%
DUP14 125,612 339,055,581 0.04% 99.55%
SGT 118,217 339,173,798 0.03% 99.58%
RETURNDATACOPY 109,058 339,282,856 0.03% 99.61%
PUSH16 108,720 339,391,576 0.03% 99.64%
PUSH15 101,959 339,493,535 0.03% 99.67%
CODECOPY 95,152 339,588,687 0.03% 99.70%
TIMESTAMP 94,088 339,682,775 0.03% 99.73%
SWAP11 76,508 339,759,283 0.02% 99.75%
SWAP10 75,164 339,834,447 0.02% 99.77%
DELEGATECALL 68,062 339,902,509 0.02% 99.79%
PUSH12 61,088 339,963,597 0.02% 99.81%
DUP15 58,489 340,022,086 0.02% 99.83%
PUSH17 42,547 340,064,633 0.01% 99.84%
LOG2 38,915 340,103,548 0.01% 99.85%
MOD 38,868 340,142,416 0.01% 99.86%
LOG1 36,896 340,179,312 0.01% 99.88%
DUP16 33,534 340,212,846 0.01% 99.89%
PUSH21 30,857 340,243,703 0.01% 99.89%
PUSH31 26,782 340,270,485 0.01% 99.90%
XOR 26,581 340,297,066 0.01% 99.91%
PUSH13 25,980 340,323,046 0.01% 99.92%
SWAP13 24,810 340,347,856 0.01% 99.92%
NUMBER 24,484 340,372,340 0.01% 99.93%
LOG4 23,446 340,395,786 0.01% 99.94%
SIGNEXTEND 23,127 340,418,913 0.01% 99.95%
PUSH6 17,898 340,436,811 0.01% 99.95%
PUSH9 17,508 340,454,319 0.01% 99.96%
CHAINID 15,897 340,470,216 0.00% 99.96%
PUSH25 14,112 340,484,328 0.00% 99.96%
SWAP12 13,661 340,497,989 0.00% 99.97%
GETPC 11,754 340,509,743 0.00% 99.97%
CODESIZE 11,322 340,521,065 0.00% 99.98%
EXTCODEHASH 8,392 340,529,457 0.00% 99.98%
SDIV 7,952 340,537,409 0.00% 99.98%
REVERT 6,215 340,543,624 0.00% 99.98%
PUSH10 6,124 340,549,748 0.00% 99.98%
SELFDESTRUCT 5,967 340,555,715 0.00% 99.99%
BALANCE 5,945 340,561,660 0.00% 99.99%
PUSH7 4,916 340,566,576 0.00% 99.99%
SWAP14 4,597 340,571,173 0.00% 99.99%
PUSH11 4,005 340,575,178 0.00% 99.99%
ORIGIN 3,608 340,578,786 0.00% 99.99%
GASPRICE 3,586 340,582,372 0.00% 99.99%
PUSH19 2,813 340,585,185 0.00% 99.99%
SMOD 2,586 340,587,771 0.00% 100.00%
SAR 2,380 340,590,151 0.00% 100.00%
CREATE 1,895 340,592,046 0.00% 100.00%
PUSH22 1,828 340,593,874 0.00% 100.00%
MSIZE 1,826 340,595,700 0.00% 100.00%
SWAP15 1,806 340,597,506 0.00% 100.00%
CREATE2 1,173 340,598,679 0.00% 100.00%
PUSH27 1,157 340,599,836 0.00% 100.00%
GASLIMIT 939 340,600,775 0.00% 100.00%
PUSH26 832 340,601,607 0.00% 100.00%
SWAP16 744 340,602,351 0.00% 100.00%
PUSH23 658 340,603,009 0.00% 100.00%
PUSH24 350 340,603,359 0.00% 100.00%
COINBASE 326 340,603,685 0.00% 100.00%
PUSH18 318 340,604,003 0.00% 100.00%
BLOCKHASH 207 340,604,210 0.00% 100.00%
PUSH30 172 340,604,382 0.00% 100.00%
DIFFICULTY 33 340,604,415 0.00% 100.00%
@gcolvin
Copy link
Author

gcolvin commented Sep 21, 2021

OP Count % pushdata % pushdata % data
JUMPDEST 22,374,953 6.57% 6.57%
JUMPI 14,963,477 4.39% 4.39%
JUMP 11,389,635 3.34% 3.34%
All PUSH 78,137,163 22.94% 261,092,018 43.39%
PUSH1 37,886,773 11.12% 1 37,886,773 14.51% 6.30%
PUSH2 28,280,939 8.30% 2 56,561,878 21.66% 9.40%
PUSH3 219,949 0.06% 3 659,847 0.25% 0.11%
PUSH4 5,247,460 1.54% 4 20,989,840 8.04% 3.49%
PUSH5 144,613 0.04% 5 723,065 0.28% 0.12%
PUSH6 17,898 0.01% 6 107,388 0.04% 0.02%
PUSH7 4,916 0.00% 7 34,412 0.01% 0.01%
PUSH8 345,608 0.10% 8 2,764,864 1.06% 0.46%
PUSH9 17,508 0.01% 9 157,572 0.06% 0.03%
PUSH10 6,124 0.00% 10 61,240 0.02% 0.01%
PUSH11 4,005 0.00% 11 44,055 0.02% 0.01%
PUSH12 61,088 0.02% 12 733,056 0.28% 0.12%
PUSH13 25,980 0.01% 13 337,740 0.13% 0.06%
PUSH14 378,201 0.11% 14 5,294,814 2.03% 0.88%
PUSH15 101,959 0.03% 15 1,529,385 0.59% 0.25%
PUSH16 108,720 0.03% 16 1,739,520 0.67% 0.29%
PUSH17 42,547 0.01% 17 723,299 0.28% 0.12%
PUSH18 318 0.00% 18 5,724 0.00% 0.00%
PUSH19 2,813 0.00% 19 53,447 0.02% 0.01%
PUSH20 2,921,374 0.86% 20 58,427,480 22.38% 9.71%
PUSH21 30,857 0.01% 21 647,997 0.25% 0.11%
PUSH22 1,828 0.00% 22 40,216 0.02% 0.01%
PUSH23 658 0.00% 23 15,134 0.01% 0.00%
PUSH24 350 0.00% 24 8,400 0.00% 0.00%
PUSH25 14,112 0.00% 25 352,800 0.14% 0.06%
PUSH26 832 0.00% 26 21,632 0.01% 0.00%
PUSH27 1,157 0.00% 27 31,239 0.01% 0.01%
PUSH28 160,053 0.05% 28 4,481,484 1.72% 0.74%
PUSH29 262,631 0.08% 29 7,616,299 2.92% 1.27%
PUSH30 172 0.00% 30 5,160 0.00% 0.00%
PUSH31 26,782 0.01% 31 830,242 0.32% 0.14%
PUSH32 1,818,938 0.53% 32 58,206,016 22.29% 9.67%

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment