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

Optimization: Removed double iszero before jumpi #130

Merged
merged 2 commits into from
Jul 10, 2023

Conversation

manasbir
Copy link
Collaborator

@manasbir manasbir commented Jul 1, 2023

using iszero twice before jumpi is unnecessary as jumpi is compares between non-zero and zero (if !0 -> true), and not between 1 and 0 (if 1 -> true, else -> false).

https://www.evm.codes/#57?fork=shanghai

src/utils/Refunded.huff Outdated Show resolved Hide resolved
src/utils/ERC20Transfer.huff Outdated Show resolved Hide resolved
src/utils/ERC20Transfer.huff Show resolved Hide resolved
@manasbir
Copy link
Collaborator Author

manasbir commented Jul 7, 2023

Forget to mention, this (hopefully) resolves #117

@Maddiaa0 Maddiaa0 merged commit 3849482 into main Jul 10, 2023
@Maddiaa0 Maddiaa0 deleted the optimization-removed-double-iszero branch July 10, 2023 21:04
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