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

CategoricalValue allocates on julia 1.11 #412

Open
tiemvanderdeure opened this issue Jan 8, 2025 · 0 comments
Open

CategoricalValue allocates on julia 1.11 #412

tiemvanderdeure opened this issue Jan 8, 2025 · 0 comments

Comments

@tiemvanderdeure
Copy link
Contributor

MWE

using CategoricalArrays
A = rand(1:10, 1000)
Acat = categorical(A)
@allocations getindex.(Ref(Acat),eachindex(Acat))

On julia 1.11.2, this gives 1020 allocations (vs 17 on julia 1.10.7). The computation time is also ~ doubled. I profiled and it seems each call to CategoricalValue generates an allocation.

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

No branches or pull requests

1 participant