gakonst / solidity-book

The Senior Solidity Engineer's Book is a resource meant to transform you into a Senior Solidity Engineer.
https://solidity-book.netlify.app/
843 stars 58 forks source link

Added in a Chapter on Optimization #14

Open ControlCplusControlV opened 2 years ago

ControlCplusControlV commented 2 years ago

Compiling my thoughts for tips on writing optimal code, still a rough draft as I need to add in code examples but wanted to make this draft PR to give you an idea as to content. Also still need a lot on Assembly optimizations and inline stuff, as well as some conditional optimizations people should make

netlify[bot] commented 2 years ago

✔️ Deploy Preview for solidity-book ready!

🔨 Explore the source changes: 87cb0856a6bec775dc1e2d9cd0915a9c0df13987

🔍 Inspect the deploy log: https://app.netlify.com/sites/solidity-book/deploys/61ecd75b9cbffa0008c0b690

😎 Browse the preview: https://deploy-preview-14--solidity-book.netlify.app

gakonst commented 2 years ago

Looks good! LMK when you want an in-depth review

ControlCplusControlV commented 2 years ago

I want to add more code examples which is whats holding it back for me, I also want to add a couple other sections + tips

ControlCplusControlV commented 2 years ago

@gakonst added some more changes, and polished it up. I am ready for review, think this has most of the vanilla gas optimization tricks that don't hurt readability and stay within the realm of Solidity. May make a chapter later on with more extreme tips but I think this is good for now