Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upOptimize bincode::deserialize #122
Closed
Comments
|
Fixed a long time ago with the SizeLimit trait |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This function is inefficient because in addition to a bunch of sizelimit-related branching (cc #121) the deserializer is forced to perform two writes for every time it reads from the input - once within
self.readerand another to updateself.read- even thoughself.readis never going to be used.A specialized implementation for &[u8] would enable optimizing this case to perform just a single write - cc #119.