MCPcopy Create free account
hub / github.com/emscripten-core/emscripten / test_memcpy

Function test_memcpy

test/benchmark/benchmark_memcpy.cpp:29–47  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

27uint8_t resultCheckSum = 0;
28
29void __attribute__((noinline)) test_memcpy(int numTimes, int copySize)
30{
31 for(int i = 0; i < numTimes - 8; i += 8)
32 {
33 memcpy(dst, src, copySize); resultCheckSum += dst[copySize >> 1];
34 memcpy(dst, src, copySize); resultCheckSum += dst[copySize >> 1];
35 memcpy(dst, src, copySize); resultCheckSum += dst[copySize >> 1];
36 memcpy(dst, src, copySize); resultCheckSum += dst[copySize >> 1];
37 memcpy(dst, src, copySize); resultCheckSum += dst[copySize >> 1];
38 memcpy(dst, src, copySize); resultCheckSum += dst[copySize >> 1];
39 memcpy(dst, src, copySize); resultCheckSum += dst[copySize >> 1];
40 memcpy(dst, src, copySize); resultCheckSum += dst[copySize >> 1];
41 }
42 numTimes &= 15;
43 for(int i = 0; i < numTimes; ++i)
44 {
45 memcpy(dst, src, copySize); resultCheckSum += dst[copySize >> 1];
46 }
47}
48
49std::vector<int> copySizes;
50std::vector<double> results;

Callers 1

test_caseFunction · 0.70

Calls 1

memcpyFunction · 0.85

Tested by

no test coverage detected