Put the values being tested as keys to an associative array. Then when you want to test the 10th column, it takes a single array lookup to see if that key exists.
This simple change ought to make your script considerably faster.
A program like this should be mostly I/O bound (limited by the speed at which you can read strings from the file, rather than the speed you can process strings). If you still have efficiency concerns after this change, you should show your code and invite further discussion.