Skip to content

CategoricalValue allocates on julia 1.11 #412

Closed
@tiemvanderdeure

Description

@tiemvanderdeure

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions