From b75279fe4bd5f09ae4ce84d4539ffd03ba8dd7fb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Philipp=20Kr=C3=BCger?= Date: Thu, 13 Nov 2025 09:05:36 +0100 Subject: [PATCH] refactor(quinn-proto): Use `ArrayRangeSet` in favor of `RangeSet` This seems to improve performance by ~8-10% in local benchmarks for us. --- quinn-proto/src/connection/send_buffer.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/quinn-proto/src/connection/send_buffer.rs b/quinn-proto/src/connection/send_buffer.rs index 53a7416efc..217d2bada8 100644 --- a/quinn-proto/src/connection/send_buffer.rs +++ b/quinn-proto/src/connection/send_buffer.rs @@ -2,7 +2,7 @@ use std::{collections::VecDeque, ops::Range}; use bytes::{Buf, Bytes}; -use crate::{VarInt, range_set::RangeSet}; +use crate::{VarInt, range_set::ArrayRangeSet}; /// Buffer of outgoing retransmittable stream data #[derive(Default, Debug)] @@ -20,9 +20,9 @@ pub(super) struct SendBuffer { /// Acknowledged ranges which couldn't be discarded yet as they don't include the earliest /// offset in `unacked` // TODO: Recover storage from these by compacting (#700) - acks: RangeSet, + acks: ArrayRangeSet, /// Previously transmitted ranges deemed lost - retransmits: RangeSet, + retransmits: ArrayRangeSet, } impl SendBuffer {