Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

perf: reduce NewCarReader allocations #420

Merged
merged 1 commit into from
May 9, 2023

Commits on May 4, 2023

  1. perf: reduce NewCarReader allocations

    This accounted for almost 10% of the garbage on one of Bluesky's
    server daemons (go tool pprof --alloc_space), leading to high GC CPU.
    
    benchstat:
    
                             │   before    │                after                │
                             │   sec/op    │   sec/op     vs base                │
        NewCarReader_small-8   2.005µ ± 1%   1.451µ ± 5%  -27.61% (p=0.000 n=10)
    
                             │    before    │                after                 │
                             │     B/op     │     B/op      vs base                │
        NewCarReader_small-8   5.268Ki ± 0%   1.135Ki ± 0%  -78.46% (p=0.000 n=10)
    
                             │   before   │               after               │
                             │ allocs/op  │ allocs/op   vs base               │
        NewCarReader_small-8   29.00 ± 0%   27.00 ± 0%  -6.90% (p=0.000 n=10)
    bradfitz committed May 4, 2023
    Configuration menu
    Copy the full SHA
    70a1789 View commit details
    Browse the repository at this point in the history