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

perf(primitives): optimize AccountInfo.is_empty() #922

Merged
merged 2 commits into from
Dec 25, 2023

Conversation

IaroslavMazur
Copy link
Contributor

This is a small optimization for AccountInfo.is_empty() with regards to the short-circuiting of bool operators in Rust.

This is a small optimization for AccountInfo.is_empty() with
regards to the short-circuiting of bool operators in Rust.
@IaroslavMazur
Copy link
Contributor Author

Reference: Lazy boolean operators.

Quote: "the right-hand operand is only evaluated when the left-hand operand does not already determine the result of the expression"

@IaroslavMazur IaroslavMazur changed the title perf(primitiv): optimize AccountInfo.is_empty() perf(primitives): optimize AccountInfo.is_empty() Dec 23, 2023
@rakita rakita merged commit 42caf55 into bluealloy:main Dec 25, 2023
22 checks passed
@github-actions github-actions bot mentioned this pull request Jan 12, 2024
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.

2 participants