Skip to content

recode can be too slow #343

Closed
Closed
@pgagarinov

Description

@pgagarinov

On the following screenshot I compare performance of recode(cat_data_vec, cat_vec=>"None") for 2 cases:
a) cat_vec is a categorical array
b) cat_vec is a string array

It turns out that performance of a) is significantly lower

image

It is not easy to reproduce the real scale of performance differences on artificial data, by on real data (300k records and 30k unique categories) case a) is actually 10 times slower (40 seconds) than b) (4 seconds).

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