MCPcopy
hub / github.com/uber/aresdb / BenchmarkMemEqual_ByteToByte

Function BenchmarkMemEqual_ByteToByte

utils/memory_test.go:42–50  ·  view source on GitHub ↗
(b *testing.B)

Source from the content-addressed store, hash-verified

40}
41
42func BenchmarkMemEqual_ByteToByte(b *testing.B) {
43 key1 := [16]byte{1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}
44 key2 := [16]byte{1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}
45 kp1 := unsafe.Pointer(&key1[0])
46 kp2 := unsafe.Pointer(&key2[0])
47 for i := 0; i < b.N; i++ {
48 byteToByteCopy(kp1, kp2, 16)
49 }
50}
51
52var _ = ginkgo.Describe("memory", func() {
53 ginkgo.It("Memory equal should work", func() {

Callers

nothing calls this directly

Calls 1

byteToByteCopyFunction · 0.85

Tested by

no test coverage detected