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

tests: optimize foundry tests to use bit operation over modulo #812

Merged
merged 2 commits into from
Dec 1, 2023

Conversation

skimaharvey
Copy link
Member

@skimaharvey skimaharvey commented Nov 28, 2023

What does this PR introduce?

Optimisation of our foundry tests so that.
For modular operations with a power of 2 as the denominator, instead of using uint8 fee0 = fee % 32, we can use the bitwise AND operation: uint8 fee0 = fee & (32 - 1). More optimised

@skimaharvey skimaharvey changed the title tests: optimise foundry to use bit operation over modulo tests: optimize foundry tests to use bit operation over modulo Nov 28, 2023
@skimaharvey skimaharvey merged commit 7439045 into develop Dec 1, 2023
25 checks passed
@skimaharvey skimaharvey deleted the foundry-optimisation branch December 1, 2023 09:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants