Similar to #22, we use bytes::put(...) instead of std::io::read* methods to de-serialize a String. Similar to a Vec<u8> these changes result in about a 10x performance increase.
I added a benchmark that tests de-serializing a message that contains a String that is the entirety of Moby Dick:
Before: 1,000,000 nsAfter: 100,000 ns
Similar to #22, we use
bytes::put(...)
instead ofstd::io::read*
methods to de-serialize aString
. Similar to aVec<u8>
these changes result in about a 10x performance increase.I added a benchmark that tests de-serializing a message that contains a
String
that is the entirety of Moby Dick:Before: 1,000,000 ns
After: 100,000 ns