Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

gas optimisation in Yul based ERC20 Example #14516

Closed
wants to merge 2 commits into from

Conversation

Akkii4
Copy link

@Akkii4 Akkii4 commented Aug 24, 2023

using shr opcode (costs 3 gas) instead of div (cost 5 gas)

@github-actions
Copy link

Thank you for your contribution to the Solidity compiler! A team member will follow up shortly.

If you haven't read our contributing guidelines and our review checklist before, please do it now, this makes the reviewing process and accepting your contribution smoother.

If you have any questions or need our help, feel free to post them in the PR or talk to us directly on the #solidity-dev channel on Matrix.

@Akkii4 Akkii4 changed the title doc: use shr instead div gas optimisation in Yul based ERC20 Example Aug 24, 2023
@mehtavishwa30
Copy link
Contributor

Hey @Akkii4!

Thanks for the taking the time to contribute to improving our docs. However, the proposed change does not align with our purpose for the Solidity docs. With the examples in the official documentation, we aim to provide a reference for the usage of the Solidity language. Optimisations like the one proposed, although not incorrect, might not be the most relevant to the example.

For this reason, I will be closing the PR but encourage you to continue providing us feedback as a docs reader and language user to help us improve the docs. If you come across buggy or incorrect references in the documentation, feel free to open an issue and discuss the proposed solution with the team. We can then assign it to you to begin working on the PR. :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants