planetscale / planetscale/vtprotobuf

Performance regression for int32 and sfixed32 lists

Open
#87 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Go
Stars
1.1k
Forks
112
PR merge metrics
No merged PRs in 30d

Description

While benchmarking vtprotobuf in our projects, we noticed a performance regression in case of lists of int32 and sfixed32 numbers.

Marshaling and unmarshaling both seem to be slower with vtprotobuf in case of repeated int32 fields.

Although unmarshaling is faster with vtprotobuf for repeated sfixed32, marshaling is slower.

This repository contains samples of these microbenchmarks: https://github.com/themreza/vtprotobuf-bench/tree/main

What could be causing this? Is there a way to improve the performance?

It would be helpful to have automated benchmarks for different data types comparing vtprotobuf with the built-in proto.Marshal and proto.Unmarshal.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the microbenchmarks in the linked vtprotobuf-bench repository and compare vtprotobuf with the built-in proto.Marshal and proto.Unmarshal for repeated int32 and sfixed32 fields. Inspect the generated marshaling and unmarshaling behavior, then consider the issue done when the regression is explained, performance is improved where possible, and automated benchmarks cover the data types.

Written by the indexing model from the issue text.

Assessment

Tech stack
go
Domain
performance, tooling
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.