Skip to content

Optimize comparison operators#94

Merged
Rigidity merged 3 commits into
mainfrom
optimize-comparison
Jul 12, 2026
Merged

Optimize comparison operators#94
Rigidity merged 3 commits into
mainfrom
optimize-comparison

Conversation

@Rigidity

@Rigidity Rigidity commented Jul 12, 2026

Copy link
Copy Markdown
Collaborator

Note

Medium Risk
Changes core compiler lowering for ordering operators used throughout Rue programs; behavior should be equivalent but CLVM shape and costs differ, so regression risk is in edge cases for int/bytes compares.

Overview
>= / <= (int and bytes) in lower.rs no longer lower to any(>, =); they now use not(<) or not(>), cutting extra Eq/Any nodes from generated CLVM while keeping the same semantics.

Environment::tree sorts symbols by reference count with sort_by_key(|b| Reverse(b.1)) instead of a manual sort_by on counts.

The release bumps workspace crates 0.8.4 → 0.8.5, adds rust-toolchain.toml (Rust 1.97.0), expands comparison assertions in operators.rue, and refreshes operators.yaml program/cost snapshots.

Reviewed by Cursor Bugbot for commit 6e80f9f. Bugbot is set up for automated code reviews on this repo. Configure here.

@Rigidity Rigidity merged commit 7523359 into main Jul 12, 2026
2 checks passed
@Rigidity Rigidity deleted the optimize-comparison branch July 12, 2026 16:51
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