-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
Enable SSE2 compression path to work on MSVC #2653
Conversation
msvc suport avx2 path
Hi @TrianglesPCT! Thank you for your pull request and welcome to our community. Action RequiredIn order to merge any pull request (code, docs, etc.), we require contributors to sign our Contributor License Agreement, and we don't seem to have one on file for you. ProcessIn order for us to review and merge your suggested changes, please sign at https://code.facebook.com/cla. If you are contributing on behalf of someone else (eg your employer), the individual CLA may not be sufficient and your employer may need to sign the corporate CLA. Once the CLA is signed, our tooling will perform checks and validations. Afterwards, the pull request will be tagged with If you have received this in error or have any questions, please contact us at cla@fb.com. Thanks! |
use 8bit
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
.
switch to unaligned load as I don't know if buffer will always be aligned to 32 bytes, and compilers aside from MSVC might actually use aligned loads
Thank you for signing our Contributor License Agreement. We can now accept your code for this (and any) Facebook open source project. Thanks! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Switch to unaligned load
Thanks @TrianglesPCT , did you attempt to measure performance differences provided by your PR ? |
Switch to other comment style
Remove the AVX2 part
add space
It put the changes back when I tried to make a separate pull request, i don't understand githubs interface at all.
I removed the AVX2 stuff for a later PR |
Well, even without |
All it is doing is normalizing MSVC to target the same code path as GCC/Clang when SSE2 is set as a requirement for your compile target. Not adding any new code.. The If you want specific performance comparison I can do that might be few days until I have time for that. |
That would be great! But that doesn't need to block merging this PR. You can easily measure performance with the builtin benchmark tool.
|
Will there be a hot fix for v1.5.0? |
The difference is rather spectacular. Results for 5950X. Before:
After:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a great fix, thanks for the contribution!
The compile time detection uses the
__SSE2__
predefined macro, but this does not exist on MSVC--resulting it that compiler always using scalar path.On MSVC you can detect SSE support by checking for
_M_AMD64
, as when targeting x64 it requires SSE2 as a baseline, this patch adds this check.