$ go test -bench=. -benchtime=5s
goos: darwin
goarch: amd64
pkg: github.com/rocketspacer/lookupbm
BenchmarkLookUp/ValueExists@Head/Switch-8 1000000000 6.39 ns/op
BenchmarkLookUp/ValueExists@Head/IfElse-8 10000000000 1.86 ns/op
BenchmarkLookUp/ValueExists@Head/Map-8 1000000000 9.86 ns/op
BenchmarkLookUp/ValueExists@End/Switch-8 1000000000 7.28 ns/op
BenchmarkLookUp/ValueExists@End/IfElse-8 1000000000 6.00 ns/op
BenchmarkLookUp/ValueExists@End/Map-8 1000000000 10.6 ns/op
BenchmarkLookUp/ValueDoesntExist/Switch-8 2000000000 3.93 ns/op
BenchmarkLookUp/ValueDoesntExist/IfElse-8 2000000000 6.00 ns/op
BenchmarkLookUp/ValueDoesntExist/Map-8 500000000 13.2 ns/op
PASS
ok github.com/rocketspacer/lookupbm 91.962s
$ go test -bench=. -benchtime=5s
goos: darwin
goarch: amd64
pkg: github.com/rocketspacer/lookupbm
BenchmarkLookUp/ValueExists@Head/Switch-8 1000000000 6.39 ns/op
BenchmarkLookUp/ValueExists@Head/IfElse-8 10000000000 1.88 ns/op
BenchmarkLookUp/ValueExists@Head/Map-8 1000000000 9.78 ns/op
BenchmarkLookUp/ValueExists@End/Switch-8 1000000000 6.53 ns/op
BenchmarkLookUp/ValueExists@End/IfElse-8 1000000000 6.34 ns/op
BenchmarkLookUp/ValueExists@End/Map-8 1000000000 10.8 ns/op
BenchmarkLookUp/ValueDoesntExist/Switch-8 2000000000 3.93 ns/op
BenchmarkLookUp/ValueDoesntExist/IfElse-8 2000000000 6.02 ns/op
BenchmarkLookUp/ValueDoesntExist/Map-8 500000000 12.8 ns/op
PASS
ok github.com/rocketspacer/lookupbm 91.421s
$ go test -bench=. -benchtime=5s
goos: darwin
goarch: amd64
pkg: github.com/rocketspacer/lookupbm
BenchmarkLookUp/ValueExists@Head/Switch-8 1000000000 6.31 ns/op
BenchmarkLookUp/ValueExists@Head/IfElse-8 10000000000 1.79 ns/op
BenchmarkLookUp/ValueExists@Head/Map-8 1000000000 9.35 ns/op
BenchmarkLookUp/ValueExists@End/Switch-8 1000000000 6.33 ns/op
BenchmarkLookUp/ValueExists@End/IfElse-8 2000000000 5.95 ns/op
BenchmarkLookUp/ValueExists@End/Map-8 1000000000 11.7 ns/op
BenchmarkLookUp/ValueDoesntExist/Switch-8 2000000000 3.91 ns/op
BenchmarkLookUp/ValueDoesntExist/IfElse-8 2000000000 5.85 ns/op
BenchmarkLookUp/ValueDoesntExist/Map-8 500000000 12.5 ns/op
PASS
ok github.com/rocketspacer/lookupbm 96.056s