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

Research on re-writing some functions in Yul to optimize for gas #795

Open
smol-ninja opened this issue Jan 16, 2024 · 1 comment
Open
Labels
effort: epic Multi-stage task that may require multiple PRs. priority: 3 Nice-to-have. Willing to ship without this. type: perf Change that improves performance. work: complex Probe-sense-respond. The relationship between cause and effect can only be perceived in retrospect.

Comments

@smol-ninja
Copy link
Member

smol-ninja commented Jan 16, 2024

Gas costs are relevant not only on Ethereum but on L2s as well. It can even influence the choice of the protocol by users. There is already an ongoing discussion for ideas on optimising contracts for gas.

Yul, being an intermediate language, offers more efficient gas management while interacting with smart contracts. Investigate functions and subroutines where Yul can be used to substitute Solidity without affecting the functionalities. Some of the areas that can be looked at:

@smol-ninja smol-ninja added effort: high Large or difficult task. work: complex Probe-sense-respond. The relationship between cause and effect can only be perceived in retrospect. priority: 3 Nice-to-have. Willing to ship without this. type: perf Change that improves performance. labels Jan 16, 2024
@smol-ninja smol-ninja self-assigned this Jan 16, 2024
@smol-ninja smol-ninja changed the title Investigate whether re-writing some functions in Yul can optimize for gas Research on re-writing some functions in Yul to optimize for gas Jan 16, 2024
@PaulRBerg
Copy link
Member

PaulRBerg commented Jan 16, 2024

Yul typically impairs the readability of the code, but I'm happy to give this idea a go (and see some optimization proposals).

Anyway - I'd classify this as effort: epic.

@PaulRBerg PaulRBerg added effort: epic Multi-stage task that may require multiple PRs. and removed effort: high Large or difficult task. labels Jan 16, 2024
@smol-ninja smol-ninja removed their assignment May 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
effort: epic Multi-stage task that may require multiple PRs. priority: 3 Nice-to-have. Willing to ship without this. type: perf Change that improves performance. work: complex Probe-sense-respond. The relationship between cause and effect can only be perceived in retrospect.
Projects
None yet
Development

No branches or pull requests

2 participants