Skip to content

Instantly share code, notes, and snippets.

@hackintoshrao
Created June 30, 2015 04:04
Show Gist options
  • Save hackintoshrao/dfbef4bcb82587ef135f to your computer and use it in GitHub Desktop.
Save hackintoshrao/dfbef4bcb82587ef135f to your computer and use it in GitHub Desktop.
Benchmark for marshal.go
package bench2
import (
"testing"
)
func BenchmarkMarshalMap(b *testing.B) {
for i := 0; i < b.N; i++ {
MarshalMap()
}
}
func BenchmarkMarshalStruct(b *testing.B) {
for i := 0; i < b.N; i++ {
MarshalStruct()
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment