in reply to fastest way to compare numerical strings?
Drawing from my experience when developing a Do Not Call List discriminator, I too had thousands of comparisons to make of sets of numbers, each list had thousands of ten digit numbers. In the beginning we were looking for a match, then took the steps of what to do with it. It was slow! And then...
What I found that impacted the speed the most was adding the thought of elimination as the primary criteria in my comparisons. As you went through a process of comparisons, each step had a valid reason to either continue comparing, or most importantly to speed, stop comparing and either log the results, or dump it and grab the NEXT line/entry/whatever.
So, the loop system will perform the best when you have inserted the reasons for LAST and NEXT.
I acknowledge that your comparisons differ from what I was dealing with, but I am also sure that the results will improve if you can implement this thought process inot your code.
|
|---|