My application handling and processing a lot of binary data using
Vec<u8> and seems performance is quite OK, but I’ve notices very weird thing!
Example when I’m doing something like this
It performs about 30% slower than when I’m doing without indexing
// it performs better even if buffer is 2x larger than Sliced part some_buffer.extend(buffer);
Just for interest I’ve compared similar thing with C++ and it seems that there is absolutely no difference with index or without index in that implementation.
So just curious what is actually happening when I’m doing
What should I do to get most efficient way of getting reference of partial Slice ?