Re:Challenges for Rust
by zozbot234 on Saturday September 17, 2022 @07:46AM
(#32876727)
> 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.
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.