|Problems? Is your data what you think it is?|
Re: simple string comparison for efficiencyby GrandFather (Sage)
|on May 28, 2009 at 21:05 UTC||Need Help??|
Tell us about the larger picture. There is likely to be room for improving whatever you are doing at present, or at least for us to target solutions to whatever the bigger problem is. Most gains in performance are not obtained by micro-optimizations such as you are asking for. Some tricks that will give huge performance gains in some situations will cripple the code in other situations.
That said, you can build masks then xor the strings to give something like the fast match you are looking for where the strings to be matched are fairly long. Consider:
If you can cache the masks (say you were matching all strings against all others for example) then you get a greater gain.
True laziness is hard work