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

zig: Improve transfer-lamports performance with new SDK version #8

Merged
merged 2 commits into from
Oct 11, 2024

Conversation

joncinque
Copy link
Owner

Problem

The current Zig implementation of transfer-lamports is pretty inefficient, still using 186 CUs. This is because v0.13 of the SDK uses many allocations for the provided accounts.

Summary of changes

v0.14.0 of the SDK removes all allocations in the entrypoint, so update the transfer-lamports program to use it. Reduces CUs from 186 to 43, making it more efficient than C!

@joncinque joncinque merged commit f064cf0 into main Oct 11, 2024
22 checks passed
@joncinque joncinque deleted the tlzig branch October 11, 2024 22:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant