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

faster structarray creation #266

Merged
merged 1 commit into from
Mar 13, 2023
Merged

faster structarray creation #266

merged 1 commit into from
Mar 13, 2023

Conversation

aplavin
Copy link
Member

@aplavin aplavin commented Mar 3, 2023

Much faster for small arrays:

julia> @btime StructArray(a=1:1, b=[2], c=[:a])
  111.975 ns (4 allocations: 192 bytes)  # before
  56.601 ns (2 allocations: 128 bytes)   # after

julia> @btime StructArray(a=1:1, b=2:2, c=3.:3)
  87.747 ns (3 allocations: 208 bytes)   # before
  1.750 ns (0 allocations: 0 bytes)      # after

@aplavin
Copy link
Member Author

aplavin commented Mar 9, 2023

Bump...

src/utils.jl Show resolved Hide resolved
@piever piever merged commit e2f0667 into JuliaArrays:master Mar 13, 2023
@aplavin aplavin deleted the fast branch March 25, 2023 20:20
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.

2 participants