Skip to content

add a constructor for Union{} #36863

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jul 31, 2020
Merged

add a constructor for Union{} #36863

merged 1 commit into from
Jul 31, 2020

Conversation

vtjnash
Copy link
Member

@vtjnash vtjnash commented Jul 30, 2020

This often shows up accidentally in method intersections, which can force recompilation of completely unrelated code. Define this explicitly so that the compiler can always ignore this dispatch possibility.

This often shows up accidentally in method intersections, which can force recompilation of completely unrelated code. Define this explicitly so that the compiler can always ignore this dispatch possibility.
@vtjnash vtjnash requested review from JeffBezanson and timholy July 30, 2020 21:07
@timholy
Copy link
Member

timholy commented Jul 30, 2020

StaticArrays goes from 1200 invalidations to just 31. Whether we do it this way or some other way, this is a great outcome! 🎆

@timholy
Copy link
Member

timholy commented Jul 30, 2020

To those watching, worth noting that this works thanks to #36733.

@JeffBezanson JeffBezanson added the latency Latency label Jul 31, 2020
@StefanKarpinski StefanKarpinski merged commit a6061a6 into master Jul 31, 2020
@StefanKarpinski StefanKarpinski deleted the jn/bottom-constructor branch July 31, 2020 14:53
simeonschaub pushed a commit to simeonschaub/julia that referenced this pull request Aug 11, 2020
This often shows up accidentally in method intersections, which can force recompilation of completely unrelated code. Define this explicitly so that the compiler can always ignore this dispatch possibility.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
latency Latency
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants