Last active
August 6, 2021 11:39
-
-
Save percybolmer/e1b246b3d27a6c6d32d6def522e288d5 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
// insertXIntSlice is used to add X amount of items into a []int | |
func insertXIntSlice(x int, b *testing.B) { | |
// Initalize a Slice and insert X amount of Items | |
testSlice := make([]int, 0) | |
// reset timer | |
b.ResetTimer() | |
for i := 0; i < x; i++ { | |
testSlice = append(testSlice, i) | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment