kvrocks icon indicating copy to clipboard operation
kvrocks copied to clipboard

Rethink `USE_ALIGNED_ACCESS` macro in kvrocks code

Open mapleFU opened this issue 1 year ago • 0 comments

Search before asking

  • [X] I had searched in the issues and found no similar issues.

Motivation

Redis uses USE_ALIGNED_ACCESS and check memory aligned in it's code:

  1. For archs like ARM, memory access should be "aligned".
  2. For arch like x86, it can use some code to do optimizations

This code leaves lots of ad-hoc optimizations in kvrocks. I think we need to check our compiler supports, does this really provides any optimizations

Solution

  1. Checks USE_ALIGNED_ACCESS in code with compiler versions
  2. Remove them if no really optimizations

Are you willing to submit a PR?

  • [X] I'm willing to submit a PR!

mapleFU avatar Apr 20 '24 14:04 mapleFU