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

labelset: optimise String() function #590

Merged
merged 1 commit into from Feb 29, 2024

Commits on Feb 29, 2024

  1. labelset: optimise String() function

    Build the output in a `bytes.Buffer` to avoid creating small strings
    which are passed to `Join`.
    
    Use stack arrays to avoid allocations for small
    buffers, and `AppendQuote`/`AvailableBuffer` avoids
    allocating and copying in the case that buffer
    space is sufficient.
    
    Signed-off-by: Bryan Boreham <bjboreham@gmail.com>
    bboreham committed Feb 29, 2024
    Configuration menu
    Copy the full SHA
    052ca1f View commit details
    Browse the repository at this point in the history