2 ms·
> it ends with the copy of a whole megabyte of a structure That's actually a good start for just making things work but yes, maybe you can try to optimize that
by zozbot234 4y ago
> it ends with the copy of a whole megabyte of a structure
That's actually a good start for just making things work but yes, maybe you can try to optimize that away much as you would in C. E.g. you can use std::borrow::Cow<> to abstract across "owned" and "borrowed" data, so that copies only happen when necessary.