-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Description
Is your feature request related to a problem or challenge? Please describe what you are trying to do.
RleDecoder has an buffer inlined within the struct here. This is perhaps surprising as it results in a struct that is 4Kb in size, with all the implications that has for the cost of moves, etc...
I only noticed this because clippy's large enum variant lint tripped whilst working on #1054.
My solution there was to use Box<RleDecoder> but I think it might be better to heap allocate this buffer, especially since it is only used by RleDecoder::get_batch_with_dict which may not even be called.
Describe the solution you'd like
Change the type of index_buf from [i32; 1024] to Option<Box<[i32; 1024]>>
Describe alternatives you've considered
It could be left unchanged