Skip to content
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

Documentation: Mention Vararg{Any, N} in the "Performance Tips" section of the manual #34796

Merged
merged 3 commits into from Feb 19, 2020
Merged

Conversation

DilumAluthge
Copy link
Member

@DilumAluthge DilumAluthge commented Feb 18, 2020

This pull request adds two lines to the "Performance Tips" section of the manual to explain that Vararg{Any, N} can be used to force specialization on varargs.

I'm not sure if this should be Vararg{<:Any, N} or Vararg{Any, N}. They both seem to force specialization, so I'm not sure if there is any difference between the two.

Hat tip to @tkf for showing me that this works.

@StefanKarpinski
Copy link
Sponsor Member

That's a lot of reviewers. I'll decline since I don't know about this.

@StefanKarpinski StefanKarpinski removed their request for review February 18, 2020 16:31
@JeffBezanson
Copy link
Sponsor Member

I'd prefer Any here for simplicity.

@DilumAluthge DilumAluthge changed the title Documentation: Mention Vararg{<:Any, N} in the "Performance Tips" section of the manual Documentation: Mention Vararg{Any, N} in the "Performance Tips" section of the manual Feb 18, 2020
@DilumAluthge
Copy link
Member Author

I'd prefer Any here for simplicity.

Done. I’ve changed <:Any to Any.

I’m assuming the two forms are equivalent?

@timholy timholy merged commit e803d78 into JuliaLang:master Feb 19, 2020
@timholy
Copy link
Sponsor Member

timholy commented Feb 19, 2020

Thanks @DilumAluthge!

@fredrikekre fredrikekre removed their request for review February 19, 2020 22:58
@DilumAluthge DilumAluthge deleted the dpa/document-varargs-any-n branch February 19, 2020 23:10
birm pushed a commit to birm/julia that referenced this pull request Feb 22, 2020
KristofferC pushed a commit that referenced this pull request Apr 11, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants