code-423n4 / 2022-03-sublime-findings

0 stars 0 forks source link

Gas Optimizations #29

Open code423n4 opened 2 years ago

code423n4 commented 2 years ago
  1. Cache for loop condition. It's better to cache the length instead of using .length in for loops conditions.

  2. Use inline methods. The following methods are internal an called only once.

ritik99 commented 2 years ago

Both suggestions are valid, although the second suggestion reduces readability, hence we might continue with the current structure