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

Function byteToByteCopy

utils/memory_test.go:23–30  ·  view source on GitHub ↗
(a unsafe.Pointer, b unsafe.Pointer, bytes int)

Source from the content-addressed store, hash-verified

21)
22
23func byteToByteCopy(a unsafe.Pointer, b unsafe.Pointer, bytes int) bool {
24 for i := 0; i < bytes; i++ {
25 if *(*uint8)(MemAccess(a, i)) != *(*uint8)(MemAccess(b, i)) {
26 return false
27 }
28 }
29 return true
30}
31
32func BenchmarkMemEqual(b *testing.B) {
33 key1 := [16]byte{1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}

Callers 1

Calls 1

MemAccessFunction · 0.85

Tested by

no test coverage detected