I need to quickly compare two string on the machine with SSE4 support. How can I do it without writing assembler inserts?
Some wrappers like long long bitmask = strcmp(char* a, char* b) would be perfect.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Instead of using inline assembly, you should use the Intel SSE intrinsics.
For string comparison, you’ll need the SSE4.2 intrinsics:
Documentation is here:
http://software.intel.com/sites/products/documentation/doclib/stdxe/2013/composerxe/compiler/cpp-mac/GUID-6E9CFDF2-5DF6-42A4-B429-0E2CD441342E.htm