Trying to get fast reverse memcmp in C++

430 views Asked by At

I need to compare two char arrays as fast as possible and return which one is bigger. Normally I would use memcmp but unfortunately, there's only a pointer available for my tool pointing to the data stored in reverse order, or to the LSB in other words. I've already read this question: How to do reverse memcmp?, but since it was asked in 2011 for c I was hoping that there has been some improvement since that time. Looking at the first answer here Why is memcmp so much faster than a for loop check?, there should be a direction flag which would solve my problem, but I've no experience in embedding assembler code in c++ at all, so debugging or giving any support to others would be impossible for me.

Is there any builtin version of reverse memcmp which has been released since this question has been asked the first time? Any suggestions?

0

There are 0 answers