Try using memcmp as you know it has 50000 charecters.
50,000 doesn't sound like it would be too long. Here's some
code I tested strcmp on, it only takes a instant on a pentium 2.
Code:
include <iostream>
using std::cout;
using std::endl;
#include <cstring>
using std::memset;
using std::strcmp;
int main()
{
char s1[50000];
char s2[50000];
memset(s1, 'A', sizeof s1 - 1);
memset(s2, 'A', sizeof s2 - 1);
s1[49999] = '\0';
s2[49999] = '\0';
cout << "strcmp(s1, s2) = " << strcmp(s1, s2) << endl;
return 0;
}