You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is an important mention because not only v0.8.15 has introduced better heuristics for yul optimization, relevant for the assembly codes in here, but also because the developers have compiled this very project and found a decrease in 4.89% in deployment costs and 0.29% in runtime gas. Source
++i iterators are more efficient than i++ iterators.
x = x + y
is more efficient thanx += y
, same forx = x - y
andx -= y
RRUtils.sol
BytesUtils.sol
variables that are assigned as zero should be left unitialized
RRUtils.sol
DNSSECImpl.sol
BytesUtils.sol
Potencies of 2 (and multiples of 2) i.e.
2**(number)
can be converted into left-shift minus one2<<(number - 1)
for a more efficient operation#L219
#L69
Multiplications by multiples of 2 can be turned into a left shift which uses cheaper opcodes
#L316
require()
statements using&&
operators should be split into two differentrequire()
operations.#L268
Use a more recent version of Solidity
NameWrapper.sol
This is an important mention because not only v0.8.15 has introduced better heuristics for yul optimization, relevant for the assembly codes in here, but also because the developers have compiled this very project and found a decrease in 4.89% in deployment costs and 0.29% in runtime gas. Source
++i
iterators are more efficient thani++
iterators.RRUtils.sol
DNSSECImpl.sol
ETHRegistrarController.sol
uint256
iterators should be leftunchecked {}
as there's no risk of overflowRRUtils.sol
DNSSECImpl.sol
ETHRegistrarController.sol
<array>.length
loop comparisons being iterated one by one can use the!=
operator instead of<
RRUtils.sol
DNSSECImpl.sol
ETHRegistrarController.sol
#L93
!= 0
comparisons are more efficient than> 0
for unsigned integers#L245
#L93
require()
statements will consume less gas if the revert string contains less than 32 charactersETHRegistrarController.sol
Using unsigned integers other than
uint256
incurs overhead costs#L47
Remove unused error message
#L25
Functions that necessarily revert when called by normal users can be set as
payable
DNSSECImpl.sol
Use calldata for read-only arguments for
external
functionsDNSSECImpl.sol
The text was updated successfully, but these errors were encountered: