huff-language / huffmate

A library of modern, hyper-optimized, and extensible Huff contracts with extensive testing and documentation built by Huff maintainers.
https://github.com/pentagonxyz/huffmate
MIT License
437 stars 55 forks source link

Optimization: Removed double `iszero` before `jumpi` #130

Closed manasbir closed 1 year ago

manasbir commented 1 year ago

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

manasbir commented 1 year ago

Forget to mention, this (hopefully) resolves #117