Skip to content

chore: optimise UvarintSize - #28

Merged
rvagg merged 1 commit into
masterfrom
rvagg/varintsizeopt
Aug 19, 2025
Merged

rvagg merged 1 commit into
masterfrom
rvagg/varintsizeopt

Conversation

@rvagg

@rvagg rvagg commented Aug 12, 2025

Copy link
Copy Markdown
Member

Ref: protocolbuffers/protobuf-go@8e8926e

I got nerdsniped when I saw the above and figured we'd get some value out of it here too.

On my AMD Ryzen 9 I get these results:

  • GOAMD64=v1 (default): 25.6% improvement
  • GOAMD64=v2 (default): 25.3% improvement
  • GOAMD64=v3 (default): 42.2% improvement (this is where LZCNT comes in)
  • GOAMD64=v4 (default): 43.1% improvement

@rvagg
rvagg merged commit 5057a0a into master Aug 19, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant