kaden

Results 30 issues of kaden

for every `uint > 0` check, replace with `uint != 0` to save about 44 gas per call see: https://github.com/KadenZipfel/gas-optimizations/blob/main/gas-saving-patterns/optimal-comparison-operator.md

enhancement

Should add a section on this to https://github.com/kadenzipfel/gas-optimizations/blob/main/gas-saving-patterns/short-circuiting.md with this to leave the reader with a fully optimized statement e.g. use ``` if (condition) { if (anotherCondition) { ... }...

enhancement

for technical gas saving patterns, e.g. https://github.com/KadenZipfel/gas-optimizations/blob/main/gas-saving-patterns/optimal-comparison-operator.md, in which the pattern works because of a solidity compilation gotcha, the mechanism in which gas is saved should be better detailed, e.g....

enhancement

some things that can be added: - use selfbalance opcode instead of address(this).balance - use iszero opcode instead of if(x) - https://twitter.com/clemlak/status/1521973218864771073?s=20&t=Bw97nieWjOAs4O2x2Kr8Tg - etc

using https://rust-lang.github.io/mdBook/

documentation

in general, do while loops are cheaper than for loops. as long as the loop is must run at least once, do while is preferred over for loops

enhancement

we should make sure we have both: - clear examples, and - before and after gas benchmarks for every gas saving pattern

enhancement

enhancement

outline usage of bit-packing using uints directly

enhancement