Skip to content

Simplify Range.disjoint?/2 intersection arithmetic - #15884

Merged
josevalim merged 1 commit into
elixir-lang:mainfrom
preciz:optimize-range-disjoint-intersection
Sep 11, 2026
Merged

Simplify Range.disjoint?/2 intersection arithmetic#15884
josevalim merged 1 commit into
elixir-lang:mainfrom
preciz:optimize-range-disjoint-intersection

Conversation

@preciz

@preciz preciz commented Sep 11, 2026

Copy link
Copy Markdown
Contributor

Assisted-by: Codex:GPT-6

Less math, same result, should be around ~1.3x faster too.

Find the first intersection using modulo in the later progression. Remove floor divisions and redundant bounds checks.

Find the first intersection using modulo in the later progression. Remove floor divisions and redundant bounds checks.

Assisted-by: Codex:GPT-6
@josevalim
josevalim merged commit 929a034 into elixir-lang:main Sep 11, 2026
15 checks passed
@josevalim

Copy link
Copy Markdown
Member

💚 💙 💜 💛 ❤️

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