-
Notifications
You must be signed in to change notification settings - Fork 320
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
labelset: optimise String() function (#590)
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 <[email protected]>
- Loading branch information
Showing
1 changed file
with
20 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters