Skip to content

⚡️ LnWad micro optimization - #10

Open
Vectorized wants to merge 3 commits into
transmissions11:masterfrom
Vectorized:lnWadOpt
Open

⚡️ LnWad micro optimization#10
Vectorized wants to merge 3 commits into
transmissions11:masterfrom
Vectorized:lnWadOpt

Conversation

@Vectorized

@VectorizedVectorized commented Aug 30, 2022

Copy link
Copy Markdown

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.

@VectorizedVectorized changed the title Ln wad opt⚡️ LnWad micro optimizationAug 30, 2022
@recmo

recmo commented Oct 3, 2022

Copy link
Copy Markdown

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 freeto 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

@Vectorized@recmo