-
Notifications
You must be signed in to change notification settings - Fork 142
Open
Description
First of all, kudos to your cache-aware indices. Though the underlying logic is not obvious (!), it does work and improves performances.
Two small things, not new to version 1.1:
-
The line:
char padding_[kCacheLineSize - sizeof(writeIdxCache_)]
has no effect as the global structure has a size that is already quantized, because ofalignas(kCacheLineSize)
members. -
The way you compute
kPadding
is not optimal, because if sizeof(T) == kCacheLineSize, thenkPadding
is 1, while 0 would be better.
static constexpr size_t kPadding = (kCacheLineSize - 1) / sizeof(T) + 1;
Metadata
Metadata
Assignees
Labels
No labels