Created
January 10, 2022 10:08
-
-
Save renanbastos93/75dd8d32c4653dc06c00cb7b33d13932 to your computer and use it in GitHub Desktop.
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
package main | |
import "testing" | |
func BenchmarkTestWithLength(b *testing.B) { | |
for i := 0; i < b.N; i++ { | |
useAppendWithLength() | |
} | |
} | |
func BenchmarkTestWithoutLength(b *testing.B) { | |
for i := 0; i < b.N; i++ { | |
useAppendWithoutLength() | |
} | |
} | |
func BenchmarkTestNotUseAppend(b *testing.B) { | |
for i := 0; i < b.N; i++ { | |
notUseAppend() | |
} | |
} |
Author
renanbastos93
commented
Jan 10, 2022
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment