r-lib / sparsevctrs

Sparse vector class using ALTREP
https://r-lib.github.io/sparsevctrs/
Other
12 stars 1 forks source link

Speedup idea for `sparse_dummy()` #81

Open EmilHvitfeldt opened 2 weeks ago

EmilHvitfeldt commented 2 weeks ago

instead of starting with a list of pos. have a vector of pos same length as x. Then generate a offset vector for each level. Do some fancy offset math to make things work.