Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save percybolmer/1a2a75f99f5c0d62e22f5736f20f56e1 to your computer and use it in GitHub Desktop.
Save percybolmer/1a2a75f99f5c0d62e22f5736f20f56e1 to your computer and use it in GitHub Desktop.
// BenchmarkInsertIntMap100000 benchmarks the speed of inserting 100000 integers into the map.
func BenchmarkInsertIntMap100000(b *testing.B) {
for i := 0; i < b.N; i++ {
insertXIntMap(100000, b)
}
}
// BenchmarkInsertIntMap10000 benchmarks the speed of inserting 10000 integers into the map.
func BenchmarkInsertIntMap10000(b *testing.B) {
for i := 0; i < b.N; i++ {
insertXIntMap(10000, b)
}
}
// BenchmarkInsertIntMap1000 benchmarks the speed of inserting 1000 integers into the map.
func BenchmarkInsertIntMap1000(b *testing.B) {
for i := 0; i < b.N; i++ {
insertXIntMap(1000, b)
}
}
// BenchmarkInsertIntMap100 benchmarks the speed of inserting 100 integers into the map.
func BenchmarkInsertIntMap100(b *testing.B) {
for i := 0; i < b.N; i++ {
insertXIntMap(100, b)
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment