Skip to content

Latest commit

 

History

History
16 lines (16 loc) · 701 Bytes

Costly operations inside a loop.md

File metadata and controls

16 lines (16 loc) · 701 Bytes

Operations such as state variable updates (use SSTOREs) inside a loop cost a lot of gas, are expensive and may lead to out-of-gas errors. Optimizations using local variables are preferred. (see here)


Slide Screenshot

042.jpg


Slide Text

  • Costly Operations Inside Loops
  • State Variable Updates
  • Out-of-Gas Error
  • Use Local Variables Prevent DoS

References


Tags