a bunch of allocation optimizations

This commit is contained in:
Green Sky
2024-12-02 13:08:47 +01:00
parent 741f1428d3
commit 5601ad91f5
6 changed files with 12 additions and 5 deletions

View File

@@ -86,6 +86,7 @@ int64_t FlowOnly::canSend(float time_delta) {
std::vector<FlowOnly::SeqIDType> FlowOnly::getTimeouts(void) const {
std::vector<SeqIDType> list;
list.reserve(_in_flight.size()/3); // we dont know, so we just guess
// after 3 rtt delay, we trigger timeout
const auto now_adjusted = getTimeNow() - getCurrentDelay()*3.f;