Skip to content

replace some basic uses of fmt.Sprintf()#8672

Merged
kzys merged 1 commit intocontainerd:mainfrom
thaJeztah:save_some_trees
Jun 11, 2023
Merged

replace some basic uses of fmt.Sprintf()#8672
kzys merged 1 commit intocontainerd:mainfrom
thaJeztah:save_some_trees

Conversation

@thaJeztah
Copy link
Member

Really tiny gains here, and doesn't significantly impact readability:

BenchmarkSprintf
BenchmarkSprintf-10    11528700     91.59 ns/op   32 B/op  1 allocs/op
BenchmarkConcat
BenchmarkConcat-10    100000000     11.76 ns/op    0 B/op  0 allocs/op

Really tiny gains here, and doesn't significantly impact readability:

    BenchmarkSprintf
    BenchmarkSprintf-10    11528700     91.59 ns/op   32 B/op  1 allocs/op
    BenchmarkConcat
    BenchmarkConcat-10    100000000     11.76 ns/op    0 B/op  0 allocs/op

Signed-off-by: Sebastiaan van Stijn <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants