Skip to content

Small things #30

Description

@Philippe91

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:

  1. The line:
    char padding_[kCacheLineSize - sizeof(writeIdxCache_)]
    has no effect as the global structure has a size that is already quantized, because of alignas(kCacheLineSize) members.

  2. The way you compute kPadding is not optimal, because if sizeof(T) == kCacheLineSize, then kPadding is 1, while 0 would be better.

static constexpr size_t kPadding = (kCacheLineSize - 1) / sizeof(T) + 1;

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions