@nakuliyer @vaishumyadam @sujitv19196 @orangewit3
Found a cool resource of Solidity examples that demonstrate why and how to optimize for gas in contracts. It's from a cybersecurity startup, but nonetheless, the info is great and self-contained.
Gas: why gas optimization is important in Solidity contracts
Variable packing: optimizing gas of variables
uint8 vs. uint256: gas tradeoffs of these 2 unsigned integer types
Mapping vs. Array: brief overview of gas tradeoffs for each
Strings vs. Bytes Array: this is a classic example, and as in their other topics, they do a good job of being concise in their explanation
and more!
I highly encourage everyone to check these examples out to gain understanding of not only why gas optimization is needed, but how to implement it in your contracts.
@nakuliyer @vaishumyadam @sujitv19196 @orangewit3 Found a cool resource of Solidity examples that demonstrate why and how to optimize for gas in contracts. It's from a cybersecurity startup, but nonetheless, the info is great and self-contained.
Certik's Gas Examples
It covers:
I highly encourage everyone to check these examples out to gain understanding of not only why gas optimization is needed, but how to implement it in your contracts.