int seqDiff32 ( SV *s1, SV *s2 ) { STRLEN bytes1, bytes2; char *p1, *p2; STRLEN dwords; STRLEN lastBytes; U32 *up1, *up2; int i; p1 = SvPV( s1, bytes1 ); p2 = SvPV( s2, bytes2 ); if( bytes1 != bytes2 ) return 0; up1 = (U32*)p1; up2 = (U32*)p2; dwords = bytes1 >> 2; lastBytes = bytes1 % 4; p1 += dwords << 2; p2 += dwords << 2; while( dwords-- ) { if( *up1 != *up2 ) { for( i = 0; i < 4; ++i ) { char c1 = ( (char*)up1 )[ i ]; char c2 = ( (char*)up2 )[ i ]; if( c1 != c2 && c1 != 'N' && c2 != 'N' ) { return 0; } } } up1++; up2++; } for( i = 0; i < lastBytes; ++i ) { char c1 = ( (char*)p1 )[ i ]; char c2 = ( (char*)p2 )[ i ]; if( c1 != c2 && c1 != 'N' && c2 != 'N' ) { return 0; } } return 1; }