Skip to content

Instantly share code, notes, and snippets.

@chewxy
Created December 10, 2013 06:32
Show Gist options
  • Save chewxy/7886555 to your computer and use it in GitHub Desktop.
Save chewxy/7886555 to your computer and use it in GitHub Desktop.
package pointerTagging
import (
"testing"
)
func BenchmarkInitializingInterface(b *testing.B) {
for i := 0; i < b.N; i++ {
initializingConventional()
}
}
func BenchmarkInitializingTagging(b *testing.B) {
for i := 0; i < b.N; i++ {
initializingTagging()
}
}
func BenchmarkRetrievingInterface(b *testing.B) {
for i := 0; i < b.N; i++ {
InterfaceRetrieval()
}
}
func BenchmarkRetrievingTagging(b *testing.B) {
for i := 0; i < b.N; i++ {
RetrievingTagging()
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment