Skip to content

storage: reconsider struct comparisons with Go 1.20 #89199

@erikgrinaker

Description

@erikgrinaker

As described in #88818 (comment), Go 1.19 has a significant performance regression when comparing structs. Because of this, we had to introduce manual struct comparisons (explicitly listing each field) and give up certain inlining opportunities to recover the performance.

This regression will been fixed in Go 1.20, but won't be backported to 1.19. We should consider reverting back to using struct comparisons once we build with Go 1.20. Relevant changes:

Jira issue: CRDB-20169

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-storageRelating to our storage engine (Pebble) on-disk storage.C-performancePerf of queries or internals. Solution not expected to change functional behavior.T-storageStorage Team

    Type

    No type
    No fields configured for issues without a type.

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions