-
Notifications
You must be signed in to change notification settings - Fork 369
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
Fix handling of variable_eltype in stack #3043
Conversation
src/abstractdataframe/reshape.jl
Outdated
catnms = simnms isa Vector ? PooledArray(catnms) : simnms | ||
copyto!(catnms, nms) | ||
copyto!(simnms, nms) | ||
catnms = simnms isa Vector ? PooledArray(simnms) : simnms |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why call copyto!(simnms, nms)
rather than copyto!(catnms, nms)
later? Wouldn't the latter be faster?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Without JuliaData/PooledArrays.jl#82 released this will not work. After I make a release of PooledArrays.jl I will make this change.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have changed this as indeed it is slightly faster. Here using copyto!
should be safe as we know nms
cannot have #undef
so we are not affected by JuliaLang/julia#45125.
Co-authored-by: Milan Bouchet-Valat <nalimilan@club.fr>
Fixes #3042.
@nalimilan - I will make a patch release after this PR is merged