Gas Optimizations #68
Labels
bug
Something isn't working
G (Gas Optimization)
sponsor confirmed
Sponsor agrees this is a problem and intends to fix it (OK to use w/ "disagree with severity")
Use cached variable value
Impact
The
_submitOutOrders()
function setsbatchLength = _batchedOrders.orders.length
, but in the for loop the value "_batchedOrders.orders.length" is used instead of "batchLength". Using the cached variable could save gas.Proof of Concept
The for loop on line 369 could use the batchLength variable. This approach is used in the similar for loop on line 327.
Recommended Mitigation Steps
Use the cached "batchLength" variable
The text was updated successfully, but these errors were encountered: