in reply to speedy way to compare elements in pairs of arrays?

As others have said, you've left out some important information. What form is the data in when you start to work with it? When your script does what it needs to do, what is the nature of the output it should be producing?

Depending on what the task really is, it might be best to do some sort of preconditioning on all the input data, so that the decision criteria can be applied more efficiently -- e.g. instead of two arrays containing sequences of letters, how about a single list of strings, two characters per string (first character comes from one array, second character comes from the other array); skip the line if it contains an "x", do one thing if the two characters are the same, something else otherwise, etc etc.

But without more information, there's no point speculating about it.

  • Comment on Re: speedy way to compare elements in pairs of arrays?