in reply to Re: simple string comparison for efficiency
in thread simple string comparison for efficiency

Grandfather, your solution using bitwise operators would not have occurred to me, but was exactly what I needed. It solved the problem several orders of magnitude faster than my solution. Is there a simple way to extract the number of string positions where one or both strings had an 'N' from your code?
  • Comment on Re^2: simple string comparison for efficiency

Replies are listed 'Best First'.
Re^3: simple string comparison for efficiency
by GrandFather (Saint) on May 29, 2009 at 01:15 UTC

    Add the line:

    my $nCount = ($mask1 =~ tr/N//) + ($mask2 =~ tr/N//);

    as the third line of sub match.


    True laziness is hard work