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: allow contracts to build custom profile #6274

Closed
wants to merge 2 commits into from

Conversation

matklad
Copy link
Contributor

@matklad matklad commented Feb 9, 2022

Ad hoc (at the moment) code to profile aurora from-within EVM. Used like this:

matklad/sputnikvm@985e566

Results for uniswap:

001 -> 4694185815396
002 -> 656643209112
003 -> 1882682112828
004 -> 862992059424
005 -> 66117494916
006 -> 178600581456
007 -> 87746927400
009 -> 662333389608
010 -> 304692874992
011 -> 750543528636
016 -> 1077380881368
017 -> 803817802392
018 -> 516519634752
019 -> 226547510112
020 -> 598346009976
021 -> 2987946195036
022 -> 3210258157260
023 -> 395289006420
025 -> 232555274424
027 -> 1936934643468
028 -> 1083443770332
029 -> 86362229052
053 -> 2323583066376
054 -> 63125954100
055 -> 76389603576
080 -> 70228806648
081 -> 2823938836752
082 -> 3207423762840
086 -> 1989657670704
087 -> 4404193944612
096 -> 2126280418284
097 -> 1583968205688
098 -> 64532866860
099 -> 86665826016
100 -> 22725343476
102 -> 16016591052
103 -> 31988753280
104 -> 2510228556
105 -> 2621300616
106 -> 2732372676
108 -> 11818067184
111 -> 25102285560
112 -> 8308190088
115 -> 172318016640
119 -> 2473204536
123 -> 15550088400
126 -> 2954516796
127 -> 100412433264
128 -> 496817919576
129 -> 617542552968
130 -> 519800785680
131 -> 385117273992
132 -> 260135701056
133 -> 151328688324
134 -> 119729098632
135 -> 57641462604
136 -> 27153416268
137 -> 35569387392
138 -> 25883081004
139 -> 24136370016
140 -> 15720398892
141 -> 20007780408
142 -> 4287381516
143 -> 5716508688
144 -> 573852563856
145 -> 324223456920
146 -> 175804033812
147 -> 76082715588
148 -> 54510876024
149 -> 31388964156
150 -> 16275759192
151 -> 16275759192
152 -> 5812771140
153 -> 3487662684
154 -> 3487662684
155 -> 3487662684
156 -> 4650216912
157 -> 1162554228
158 -> 1162554228
243 -> 59419438320
------------------------------

NEAR_GAS_WASM 111193290628332

The total amount spent on all opcodes is 46657131921576 (slightly less than half of total) The costliest opcodes are ADD (4694185815396) and JUMPI (4404193944612).

@stale
Copy link

stale bot commented Feb 23, 2022

This PR has been automatically marked as stale because it has not had recent activity in the 2 weeks.
It will be closed in 3 days if no further activity occurs.
Thank you for your contributions.

@stale stale bot added the S-stale label Feb 23, 2022
@matklad matklad closed this Jun 29, 2022
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