prefetch works best when addresses are 64-byte aligned

This commit is contained in:
Konstantinos Margaritis
2021-03-12 10:10:53 +02:00
parent 53a3e33204
commit 40531ad6e5
6 changed files with 26 additions and 22 deletions

View File

@@ -665,7 +665,7 @@ size_t prepareZones(const u8 *buf, size_t len, const u8 *hend,
const u8 *tryFloodDetect = zz->floodPtr; \
const u8 *start_ptr = zz->start; \
const u8 *end_ptr = zz->end; \
for (const u8 *itPtr = start_ptr; itPtr + 4*ITER_BYTES <= end_ptr; \
for (const u8 *itPtr = ROUNDDOWN_PTR(start_ptr, 64); itPtr + 4*ITER_BYTES <= end_ptr; \
itPtr += 4*ITER_BYTES) { \
__builtin_prefetch(itPtr); \
} \