| 50 | #endif |
| 51 | |
| 52 | static void TouchCacheLines(uint8_t* data, int64_t nbytes) { |
| 53 | uint8_t total = 0; |
| 54 | while (nbytes > 0) { |
| 55 | total += *data; |
| 56 | data += kCacheLineSize; |
| 57 | nbytes -= kCacheLineSize; |
| 58 | } |
| 59 | benchmark::DoNotOptimize(total); |
| 60 | } |
| 61 | |
| 62 | // Benchmark the cost of accessing always the same memory area. |
| 63 | // This gives us a lower bound of the potential difference between |
no outgoing calls
no test coverage detected