Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rethink USE_ALIGNED_ACCESS macro in kvrocks code #2261

Open
2 tasks done
mapleFU opened this issue Apr 20, 2024 · 0 comments
Open
2 tasks done

Rethink USE_ALIGNED_ACCESS macro in kvrocks code #2261

mapleFU opened this issue Apr 20, 2024 · 0 comments
Labels
enhancement type enhancement

Comments

@mapleFU
Copy link
Member

mapleFU commented Apr 20, 2024

Search before asking

  • 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?

  • I'm willing to submit a PR!
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement type enhancement
Projects
None yet
Development

No branches or pull requests

1 participant