Skip to content

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