[Snowball-discuss] RE:New, and a couple of questions
Sandy Ganz
sganz@bizrate.com
Wed Mar 10 19:05:03 2004
Thanks for the suggestions on the strcmp.
I was thinking along the sames lines (I replied to Martin, but didn't
realize it wasnt going to the list). Scanning from the back of the string
will be the fastest, but when all said and done, for short string I think
the strcmp() with a length check will probably very close, my thoughts is
that the cost of the optimizations will not payback unless the strings are
long, long being 10 or more (just a gut feel, no solid basis). It will all
depend on the data. I recall looking at the code in either memcmp or strcmp
and I think they block it into words, but can't say for sure, so compares
are fast, but this is all off the top of my head. The best optimization
would be not to call the function and just make the compare inlined :-)
Thanks again!
Sandy