Skip to content

Optimize shift when 2nd arg is a literal#2201

Merged
fubuloubu merged 1 commit into
vyperlang:masterfrom
iamdefinitelyahuman:optimize-shift
Oct 17, 2020
Merged

Optimize shift when 2nd arg is a literal#2201
fubuloubu merged 1 commit into
vyperlang:masterfrom
iamdefinitelyahuman:optimize-shift

Conversation

@iamdefinitelyahuman

Copy link
Copy Markdown
Contributor

What I did

Optimize the LLL for shift when the distance being shifted is a literal.

How I did it

Avoid pushing to the stack when not necessary.

How to verify it

Run tests. I didn't add any - the behaviour is already well tested.

Cute Animal Picture

image

@codecov-io

Copy link
Copy Markdown

Codecov Report

Merging #2201 into master will increase coverage by 0.01%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #2201      +/-   ##
==========================================
+ Coverage   85.26%   85.27%   +0.01%     
==========================================
  Files          83       83              
  Lines        8523     8529       +6     
  Branches     2063     2065       +2     
==========================================
+ Hits         7267     7273       +6     
  Misses        748      748              
  Partials      508      508              
Impacted Files Coverage Δ
vyper/functions/functions.py 89.41% <100.00%> (+0.08%) ⬆️

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 0b3f3b3...ba7fe4b. Read the comment docs.

@fubuloubu fubuloubu merged commit 235bd97 into vyperlang:master Oct 17, 2020
@iamdefinitelyahuman iamdefinitelyahuman deleted the optimize-shift branch October 17, 2020 00:23
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