Fastest Way To Find Mismatch Positions Between Two Strings of the Same Length

前端 未结 9 1365
后悔当初
后悔当初 2020-12-28 22:08

I have a millions of pairs of string of same length which I want to compare and find the position where it has mismatches.

For example for each $str1 a

9条回答
  •  南方客
    南方客 (楼主)
    2020-12-28 22:47

    It sounds like this might be a performance critical part of your application. In this case, you may want to consider writing a C extension method to do the comparison.

    Perl provides the XS extension mechanism which makes this reasonably straightforward.

提交回复
热议问题