BENCH Benchmark after merge.
BENCH Benchmark after merge.

----------------------------------------------------------
BENCHMARK_MARKER_DO_NOT_CHANGE
----------------------------------------------------------

TEST BENCHMARKS
testing: warning: no tests to run
PASS
BenchmarkTypeAssertion	200000000	         9.02 ns/op
BenchmarkMapLookup	50000000	        64.8 ns/op
BenchmarkNilMapLookup	100000000	        11.8 ns/op
BenchmarkNilMapLookupWithNilCheck	2000000000	         1.02 ns/op
BenchmarkArrayLookup	2000000000	         1.00 ns/op
BenchmarkTypeToInterface1	100000000	        21.1 ns/op
BenchmarkTypeToInterface2	2000000000	         0.67 ns/op
BenchmarkCheckEthernetPrefix	50000000	        51.7 ns/op
ok  	github.com/gconnell/gopacket	17.756s
PASS
BenchmarkLayerClassSliceContains	1000000000	         2.46 ns/op
BenchmarkLayerClassMapContains	50000000	        62.1 ns/op
BenchmarkLazyNoCopyEthLayer	 1000000	      1040 ns/op
BenchmarkLazyNoCopyIPLayer	 1000000	      1671 ns/op
BenchmarkLazyNoCopyTCPLayer	 1000000	      2653 ns/op
BenchmarkLazyNoCopyAllLayers	 1000000	      3009 ns/op
BenchmarkDefault	 1000000	      3239 ns/op
BenchmarkLazy	 1000000	      1178 ns/op
BenchmarkNoCopy	 1000000	      2501 ns/op
BenchmarkLazyNoCopy	 5000000	       506 ns/op
BenchmarkAlloc	10000000	       258 ns/op
BenchmarkFlow	10000000	       298 ns/op
BenchmarkEndpoints	50000000	        41.3 ns/op
BenchmarkTCPLayerFromDecodedPacket	100000000	        25.4 ns/op
BenchmarkTCPLayerClassFromDecodedPacket	20000000	       100 ns/op
BenchmarkTCPTransportLayerFromDecodedPacket	500000000	         5.70 ns/op
BenchmarkDecodeFuncCallOverheadDirectCall	2000000000	         1.34 ns/op
BenchmarkDecodeFuncCallOverheadDecoderCall	200000000	         8.40 ns/op
BenchmarkDecodeFuncCallOverheadArrayCall	100000000	        15.0 ns/op
BenchmarkDecodePacketIPSecESP	 1000000	      1761 ns/op
ok  	github.com/gconnell/gopacket/layers	51.828s
?   	github.com/gconnell/gopacket/pcap	[no test files]
?   	github.com/gconnell/gopacket/pfring	[no test files]

PCAP BENCHMARK
Reading file once through to hopefully cache most of it
Read in file /var/folders/00/07mgr000h01000cxqpysvccm000yjz/T//gopacket_benchmark.pcap , total of 341401548 bytes
Opening file "/var/folders/00/07mgr000h01000cxqpysvccm000yjz/T//gopacket_benchmark.pcap" for read
Reading all packets into memory with BufferPacketSource.
Reading packet data into memory: 1237119 packets in 1.776576s, 1.436us per packet
Time to read packet data into memory from file: 1.776629s
Benchmarking decode 1/10
	Read in 1237119 packets in 3.225562s, 2.607us per packet
Benchmarking decode 2/10
	Read in 1237119 packets in 3.256395s, 2.632us per packet
Benchmarking decode 3/10
	Read in 1237119 packets in 2.613895s, 2.112us per packet
Benchmarking decode 4/10
	Read in 1237119 packets in 2.755083s, 2.227us per packet
Benchmarking decode 5/10
	Read in 1237119 packets in 2.529266s, 2.044us per packet
Benchmarking decode 6/10
	Read in 1237119 packets in 3.05259s, 2.467us per packet
Benchmarking decode 7/10
	Read in 1237119 packets in 2.954821s, 2.388us per packet
Benchmarking decode 8/10
	Read in 1237119 packets in 2.68895s, 2.173us per packet
Benchmarking decode 9/10
	Read in 1237119 packets in 2.776587s, 2.244us per packet
Benchmarking decode 10/10
	Read in 1237119 packets in 2.594562s, 2.097us per packet
----------------------------------------------------------
BENCHMARKING AGAINST COMMIT 0d5926518128219a60f051be7a1ae690d7425391
----------------------------------------------------------

OLD TEST BENCHMARKS
testing: warning: no tests to run
PASS
BenchmarkTypeAssertion	200000000	         9.43 ns/op
BenchmarkMapLookup	50000000	        65.5 ns/op
BenchmarkNilMapLookup	100000000	        11.6 ns/op
BenchmarkNilMapLookupWithNilCheck	2000000000	         1.02 ns/op
BenchmarkArrayLookup	2000000000	         1.04 ns/op
BenchmarkTypeToInterface1	100000000	        21.6 ns/op
BenchmarkTypeToInterface2	2000000000	         0.73 ns/op
BenchmarkCheckEthernetPrefix	50000000	        58.1 ns/op
ok  	github.com/gconnell/gopacket	18.442s
PASS
BenchmarkLayerClassSliceContains	1000000000	         2.15 ns/op
BenchmarkLayerClassMapContains	50000000	        66.1 ns/op
BenchmarkLazyNoCopyEthLayer	 1000000	      1207 ns/op
BenchmarkLazyNoCopyIPLayer	 1000000	      1921 ns/op
BenchmarkLazyNoCopyTCPLayer	 1000000	      3336 ns/op
BenchmarkLazyNoCopyAllLayers	 1000000	      3130 ns/op
BenchmarkDefault	 1000000	      3174 ns/op
BenchmarkLazy	 1000000	      1185 ns/op
BenchmarkNoCopy	 1000000	      2462 ns/op
BenchmarkLazyNoCopy	 5000000	       505 ns/op
BenchmarkAlloc	10000000	       252 ns/op
BenchmarkFlow	10000000	       292 ns/op
BenchmarkEndpoints	50000000	        39.6 ns/op
BenchmarkTCPLayerFromDecodedPacket	100000000	        23.7 ns/op
BenchmarkTCPLayerClassFromDecodedPacket	20000000	        94.8 ns/op
BenchmarkTCPTransportLayerFromDecodedPacket	500000000	         5.34 ns/op
BenchmarkDecodeFuncCallOverheadDirectCall	2000000000	         1.34 ns/op
BenchmarkDecodeFuncCallOverheadDecoderCall	200000000	         8.34 ns/op
BenchmarkDecodeFuncCallOverheadArrayCall	100000000	        14.7 ns/op
BenchmarkDecodePacketIPSecESP	 1000000	      1756 ns/op
ok  	github.com/gconnell/gopacket/layers	52.069s
?   	github.com/gconnell/gopacket/pcap	[no test files]
?   	github.com/gconnell/gopacket/pfring	[no test files]

OLD PCAP BENCHMARK
Reading file once through to hopefully cache most of it
Read in file /var/folders/00/07mgr000h01000cxqpysvccm000yjz/T//gopacket_benchmark.pcap , total of 341401548 bytes
Opening file "/var/folders/00/07mgr000h01000cxqpysvccm000yjz/T//gopacket_benchmark.pcap" for read
Reading all packets into memory with BufferPacketSource.
Reading packet data into memory: 1237119 packets in 1.775381s, 1.435us per packet
Time to read packet data into memory from file: 1.775432s
Benchmarking decode 1/10
	Read in 1237119 packets in 2.686874s, 2.171us per packet
Benchmarking decode 2/10
	Read in 1237119 packets in 2.743218s, 2.217us per packet
Benchmarking decode 3/10
	Read in 1237119 packets in 2.474513s, 2us per packet
Benchmarking decode 4/10
	Read in 1237119 packets in 2.691323s, 2.175us per packet
Benchmarking decode 5/10
	Read in 1237119 packets in 2.46704s, 1.994us per packet
Benchmarking decode 6/10
	Read in 1237119 packets in 2.762433s, 2.232us per packet
Benchmarking decode 7/10
	Read in 1237119 packets in 2.709552s, 2.19us per packet
Benchmarking decode 8/10
	Read in 1237119 packets in 2.462691s, 1.99us per packet
Benchmarking decode 9/10
	Read in 1237119 packets in 3.229236s, 2.61us per packet
Benchmarking decode 10/10
	Read in 1237119 packets in 2.652668s, 2.144us per packet

rouzier/gopacket,LrsK/gopacket,chapayGhub/gopacket,aeppert/gopacket,xuzhaokui/gopacket,UIKit0/gopacket-1,wheelcomplex/gopacket,xuzhaokui/gopacket,zerklabs/gopacket,vtolstov/gopacket,dazer-chen/gopacket,urso/gopacket,breml/gopacket,google/gopacket,dazer-chen/gopacket,packetb-old/gopacket,dutchcoders/gopacket,adriantam/gopacket,ccordes-snaproute/gopacket,packetbeat/gopacket,levigross/gopacket,aeppert/gopacket,josephcopenhaver/gopacket,1d4Nf6/gopacket,cmillward/gopacket,1d4Nf6/gopacket,skyportsystems/gopacket,hkwi/gopacket,packetb-old/gopacket,packetb-old/gopacket,LrsK/gopacket,xuzhaokui/gopacket,chapayGhub/gopacket,1d4Nf6/gopacket,breml/gopacket,dutchcoders/gopacket,wheelcomplex/gopacket,skyportsystems/gopacket,packetbeat/gopacket,rouzier/gopacket,ccordes-snaproute/gopacket,UIKit0/gopacket-1,dutchcoders/gopacket,clarktrimble/gopacket,nhooyr/gopacket,clarktrimble/gopacket,vtolstov/gopacket,urso/gopacket,LrsK/gopacket,urso/gopacket,scroot/gopacket,cmillward/gopacket,wheelcomplex/gopacket,nhooyr/gopacket,adriantam/gopacket,adriantam/gopacket,google/gopacket,josephcopenhaver/gopacket,lokikiller/gopacket,hkwi/gopacket,skyportsystems/gopacket,cmillward/gopacket,lokikiller/gopacket,levigross/gopacket,packetbeat/gopacket,zerklabs/gopacket,levigross/gopacket,ccordes-snaproute/gopacket,clarktrimble/gopacket,lokikiller/gopacket,chapayGhub/gopacket,rouzier/gopacket,packetbeat/gopacket,josephcopenhaver/gopacket,packetb-old/gopacket,breml/gopacket,scroot/gopacket,hkwi/gopacket,zerklabs/gopacket,UIKit0/gopacket-1,nhooyr/gopacket,scroot/gopacket,google/gopacket,dazer-chen/gopacket,ross-williams/gopacket,ross-williams/gopacket,vtolstov/gopacket,ross-williams/gopacket,aeppert/gopacket