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

⚡️ LnWad micro optimization #10

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

Vectorized
Copy link

@Vectorized Vectorized commented Aug 30, 2022

Ain't much, but it's honest work.

If bytecode size is of priority, feel free to close. Otherwise, may be worth it if the function is frequently called.

@Vectorized Vectorized changed the title Ln wad opt ⚡️ LnWad micro optimization Aug 30, 2022
@recmo
Copy link

recmo commented Oct 3, 2022

This shaves of 1 gas and introduces awesome de Bruijn sequences. 👍

If you want bigger gas savings, you can bring lnWad down from 614 gas to 585 gas by inlining the log2 call.

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.

2 participants