Default the reflection nodes to 1:R instead of a nothing sentinel - #10
Merged
Conversation
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.
Follow-up to #8, on top of the now-merged #9.
#8 spelled "reflect in every node" as
nodes === nothing, which then had to be understood in five places. Defaulting to1:Rdeletes the sentinel: the kernel test drops fromnodes === nothing || s in nodestos in nodes, andsomething(nodes, 1:R)disappears fromis_singularand_borel_weil_bott.Dispatch was the alternative, but both cases run the same algorithm and differ only in a predicate, so it would duplicate the fold loop — and the singleton type that avoids the duplication is
Base.OneToreinvented.Measured, 2000 E₈ weights: 0.3135–0.3142 ms against 0.3141–0.3284 for the sentinel and 0.3145 before #8.
Base.OneTo(R)and1:Rbenchmark identically in-process, so1:Rwins for reading. Validation stays free: the compiler drops the check loop on the default, where the induction variable is provably in bounds.Suite, doctests and
benchmark/bench.jlgreen. Node-argument tests 33 → 40, covering out-of-range ranges and empty ones whose endpoints are out of range (9:1).