Skip to content

Conversation

@DaniPopes
Copy link
Member

Optimize it ourselves.

@grandizzy grandizzy requested a review from 0xrusowsky July 31, 2025 11:45

function assertLt(uint256 left, uint256 right) internal pure virtual {
if (!(left < right)) {
if (left >= right) {
Copy link
Contributor

@0xrusowsky 0xrusowsky Jul 31, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

in this case i think both take 2 opcodes, but personally i prefer this one for clarity. nice!

@DaniPopes DaniPopes force-pushed the dani/opt-assertions branch from 24114d0 to 2120228 Compare July 31, 2025 11:51
@DaniPopes DaniPopes enabled auto-merge (squash) July 31, 2025 11:52
@DaniPopes DaniPopes merged commit 349b909 into master Jul 31, 2025
23 checks passed
@DaniPopes DaniPopes deleted the dani/opt-assertions branch July 31, 2025 11:53
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.

4 participants