Repository navigation
Stop list searches once the answer is known - #1730
Merged
Lorenzobattistela merged 1 commit intoOct 20, 2026
Merged
Lorenzobattistela merged 1 commit into
Lorenzobattistela merged 1 commit into
Conversation
Lorenzobattistela
approved these changes
Oct 20, 2026
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
List.any,all,contains, andfindwere still evaluating a tail predicate after the head had already decided the answer. A later Nat overflow could make a successful search crash in both C and emitted JS.Defer the tail behind a runtime callback and call it only when needed. The existing neutral-tail identities still pass
--verdict; the new regression and three existing list consumers run in both backends. Repo gate: 54/54. I did not run the private gates.There is a full-scan cost: about 6–8 ms extra per two million predicate calls in my local native workload. Early exits no longer evaluate the unused tail. No compiler/checker changes or GUIDE edits.
Closes #1726
Closes #1727
Closes #1728
Closes #1729