Open rj00a opened 1 year ago
Would it increase performance just to unwrap the loop in this case? Other than that I am not sure how to convert the Read
to a statically sized buffer that can deliver some of these performance improvements.
We don't need to use Read
. &mut &[u8]
should be used instead.
Varints are prolific in the Minecraft protocol. It makes sense to try and optimize them as best as we can. The current implementation is straightforward but there is room for improvement.
See:
Benchmarks must be made with
criterion
to establish confidence.