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
430 stars 55 forks source link

opti: ERC4626, remove double iszero before jumpi #116

Closed obatirou closed 1 year ago

obatirou commented 1 year ago

Removes unnecessary iszero in ERC4626.huff used to check if stack variable is different from 0 before a jumpi. Using stack variable directly is sufficient.

Allows to save 2 instructions each time those macros are called.

Part of #117