Skip to content

SwiftNetwork: PERF: Optimize Serializer - #122

Merged
agnosticdev merged 1 commit into
mainfrom
agnosticdev/SerializerPerformance
Aug 29, 2026
Merged

SwiftNetwork: PERF: Optimize Serializer#122
agnosticdev merged 1 commit into
mainfrom
agnosticdev/SerializerPerformance

Conversation

@agnosticdev

Copy link
Copy Markdown
Collaborator

This is a first pass at optimizing Serializer Operations. This largely applies the same optimizations made to the deserializer here #82 and optimizes UInt64+VLE operations as well.
We see roughly a ~50% decrease in CPU usage here:

// Top of tree
2.03 G 100.0%	-	Serializer.serialize

// With this change
1.05 G 100.0%	-	Serializer.serialize

I have another pass I am going to do, but its a much larger scope.

@agnosticdev agnosticdev added the 🔨 semver/patch No public API change. label Aug 28, 2026
@agnosticdev
agnosticdev merged commit 5ef8e70 into main Aug 29, 2026
27 of 28 checks passed
@agnosticdev
agnosticdev deleted the agnosticdev/SerializerPerformance branch August 29, 2026 14:52
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