Closed pepijndevos closed 7 months ago
Awesome thanks! Can you provide a test case? If this is too hard, please add a comment, why the ===
is important and link this PR.
Also there might be other places, where we should use ===
not sure. Not suggesting you have to vet the codebase for this PR, but would be awesome.
Yeah it's kind of hard to write a test for I guess since it only changes the compiler optimization and not the functionality.
Attention: Patch coverage is 0%
with 1 lines
in your changes are missing coverage. Please review.
Project coverage is 25.49%. Comparing base (
8e3e773
) to head (b25fef5
).
Files | Patch % | Lines |
---|---|---|
src/ConstructionBase.jl | 0.00% | 1 Missing :warning: |
:exclamation: Your organization needs to install the Codecov GitHub app to enable full functionality.
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
From a quick search for ==
and !=
it could indeed be that the case in tuple_or_ntuple
could also be ===
but I'm not that familiar with this package so I'll leave that for now. For this PR I have at least strong evidence that it works and improves performance in our code.
Thanks! If you bump the patch version I can release after merge.
Sweet
We found that for really large tuples the Julia compiler would give up on constfolding the comparison leading to a runtime check. Tuples of symbols are
===
so this change makes it easier for the compiler to inline.