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

Alignment #17

Open
buybackoff opened this issue Jan 30, 2019 · 0 comments
Open

Alignment #17

buybackoff opened this issue Jan 30, 2019 · 0 comments

Comments

@buybackoff
Copy link
Member

buybackoff commented Jan 30, 2019

Important to remember that LMDB data is practically not aligned (to 2-bytes in dupsorted from 2014 comments from googling). Issue is here to review later that now data is returned without https://docs.microsoft.com/en-us/dotnet/api/system.reflection.emit.opcodes.unaligned?view=netframework-4.7.2

We must use (review usage if already) Unsafe.ReadUnaligned for any pointer read to T.

For Intel x64 it's ~noop and for others it's correctness issue, so performance doesn't matter.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant