[Snowball-discuss] RE:New, and a couple of questions

From: Sandy Ganz (sganz@bizrate.com)
Date: Wed Mar 10 2004 - 19:05:03 GMT


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



This archive was generated by hypermail 2.1.3 : Thu Sep 20 2007 - 12:02:46 BST