diff options
author | 2023-02-03 13:46:54 -0500 | |
---|---|---|
committer | 2023-06-29 16:04:42 +0100 | |
commit | d1662fb0dafebb536968ba445a94f7ba80d68e55 (patch) | |
tree | 5529354818d47c451b9f251897c953218489078a /quiche/src/lib.rs | |
parent | 766215443cba84540b612b0c58bc535fbacd34cf (diff) | |
download | quiche-d1662fb0dafebb536968ba445a94f7ba80d68e55.tar.gz quiche-d1662fb0dafebb536968ba445a94f7ba80d68e55.tar.zst quiche-d1662fb0dafebb536968ba445a94f7ba80d68e55.zip |
ranges: add an inline version of RangeSet
Currently the RangeSet is always backed by a BTreeMap, and the map
is allocated every Ack packet. This change is not unlike SmallVec
for Vec, where instead of allocating, a limited number of ranges can
be stored inline. Because in practice Ack packets will rarely ack
more than one or two ranges, this avoids a significant number of
allocations.
RangeSet is also used by the SendBuf to track the numbers of acked
packets. Although in this use case allocations are already rare,
with inline RangeSet the insertion operation is now also significantly
faster.
Diffstat (limited to 'quiche/src/lib.rs')
0 files changed, 0 insertions, 0 deletions