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

tuple concatenation in v0.7.0-dev is worse #23277

Closed
JeffreySarnoff opened this issue Aug 15, 2017 · 5 comments
Closed

tuple concatenation in v0.7.0-dev is worse #23277

JeffreySarnoff opened this issue Aug 15, 2017 · 5 comments
Labels
collections Data structures holding multiple items, e.g. sets performance Must go faster

Comments

@JeffreySarnoff
Copy link
Contributor

just in case this is not present as another issue
Details are from a discourse post

@ararslan ararslan changed the title tuple concatination in v0.7.0-dev is worse tuple concatenation in v0.7.0-dev is worse Aug 16, 2017
@ararslan ararslan added collections Data structures holding multiple items, e.g. sets performance Must go faster labels Aug 16, 2017
@vtjnash
Copy link
Member

vtjnash commented Aug 16, 2017

resolved in discourse

@vtjnash vtjnash closed this as completed Aug 16, 2017
@pablosanjose
Copy link
Contributor

This is still not quite resolved, I think. If I try the proposed solution

@inline tuplejoin(x) = x
@inline tuplejoin(x, y) = (x..., y...)
@inline tuplejoin(x, y, z...) = (x..., tuplejoin(y, z...)...)

to concatenate tuples of different lengths, current master (well, 16 days old) still allocates and slows down relative to v0.6.

In v0.7

julia> @btime tuplejoin((1,2),(1,2,3),(1,2,4,5),(1,2),(1,2),(1,2));
  253.331 ns (1 allocation: 128 bytes)

While in v0.6

julia> @btime tuplejoin((1,2),(1,2,3),(1,2,4,5),(1,2),(1,2),(1,2));
  4.512 ns (0 allocations: 0 bytes)

@vtjnash
Copy link
Member

vtjnash commented Aug 16, 2017

duplicate of #22545

@truedichotomy
Copy link

Where did tuplejoin go in the latest version of Julia? I can't find it anywhere.

@pablosanjose
Copy link
Contributor

I don't think it was ever part of Base.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
collections Data structures holding multiple items, e.g. sets performance Must go faster
Projects
None yet
Development

No branches or pull requests

5 participants