Commit 1ae608639c26897614af62e32b132b163f70aeee
1 parent
81fcc49d
Comment fix
Showing
1 changed file
with
1 additions
and
1 deletions
mqttpacket.cpp
| ... | ... | @@ -70,7 +70,7 @@ std::shared_ptr<MqttPacket> MqttPacket::getCopy(char new_max_qos) const |
| 70 | 70 | { |
| 71 | 71 | // if shrinking the packet doesn't alter the amount of bytes in the 'remaining length' part of the header, we can |
| 72 | 72 | // just memmove+shrink the packet. This is because the packet id always is two bytes before the payload, so we just move the payload |
| 73 | - // over it. When testing 100M copies, it went from 21000 ms to 10000 ms. In other words, about 100 µs to 200 µs per copy. | |
| 73 | + // over it. When testing 100M copies, it went from 21000 ms to 10000 ms. In other words, about 200 ns to 100 ns per copy. | |
| 74 | 74 | // There is an elaborate unit test to test this optimization. |
| 75 | 75 | if ((fixed_header_length == 2 && bites.size() < 125)) |
| 76 | 76 | { | ... | ... |