Skip to content

SwiftQUIC: PERF: Small optimizations for the tx path - #148

Open
agnosticdev wants to merge 2 commits into
mainfrom
agnosticdev/TxExtraCode
Open

agnosticdev wants to merge 2 commits into
mainfrom
agnosticdev/TxExtraCode

Conversation

@agnosticdev

Copy link
Copy Markdown
Collaborator

This change is a collection of minor optimizations for the tx path. ~450 megacycles.

  1. Removes the minimum capacity in TransmittedItems held in SentPacketRecord. This saves an allocation and lets packets with more than one stream frame take this allocation on-demand.
157.48 M 100.0%	-	 SentPacketRecord.init()
  1. This saves a path lookup in sentPacket per-packet.
734.11 M 0.9%	106.05 M	  Recovery.InnerState.sentPacket(_:time:connection:)	
155.90 M 0.2%	-       	    specialized ManyToManyProtocolHandler.path(for:)
  1. Removes a the destroy overhead of Packet, which strangely showed up as outlined destroy of SwiftTLSProtocol.SwiftTLSProtocolOptions?.
171.01 M 0.2%	25.00 M	    outlined destroy of SwiftTLSProtocol.SwiftTLSProtocolOptions?	
  1. Removal of dead code
  2. Collected stats once per-application burst loop instead of on each packet built.

@agnosticdev
agnosticdev requested review from glbrntt and rnro September 15, 2026 03:09
@agnosticdev agnosticdev added the 🔨 semver/patch No public API change. label Sep 15, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

🔨 semver/patch No public API change.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants