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

optimize identity precompile #2488

Merged
merged 2 commits into from
Oct 19, 2021

Conversation

charles-cooper
Copy link
Member

If we use staticcall, we don't need to pass value=0, saving 2 bytes in
bytecode / 3 gas at runtime

Also, we do not need to have an assert after call to identity (the only
way failure can happen is OOG and by that time it is too late to do
anything anyway).

Related: #1929, #1930

What I did

How I did it

How to verify it

Description for the changelog

Cute Animal Picture

Put a link to a cute animal picture inside the parenthesis-->

If we use staticcall, we don't need to pass value=0, saving 2 bytes in
bytecode / 3 gas at runtime

Also, we do not need to have an assert after call to identity (the only
way failure can happen is OOG and by that time it is too late to do
anything anyway).

Related: vyperlang#1929, vyperlang#1930
@codecov-commenter
Copy link

codecov-commenter commented Oct 17, 2021

Codecov Report

Merging #2488 (87d1674) into master (5bf1383) will not change coverage.
The diff coverage is 100.00%.

Impacted file tree graph

@@           Coverage Diff           @@
##           master    #2488   +/-   ##
=======================================
  Coverage   84.56%   84.56%           
=======================================
  Files          93       93           
  Lines        9228     9228           
  Branches     2086     2086           
=======================================
  Hits         7804     7804           
  Misses        937      937           
  Partials      487      487           
Impacted Files Coverage Δ
vyper/old_codegen/parser_utils.py 83.06% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 5bf1383...87d1674. Read the comment docs.

@charles-cooper charles-cooper enabled auto-merge (squash) October 19, 2021 14:53
@charles-cooper charles-cooper merged commit 93a9579 into vyperlang:master Oct 19, 2021
@charles-cooper charles-cooper deleted the optimize_identity branch October 19, 2021 15:12
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.

3 participants