if(str1==str2) contra if(str1.length()==str2.length() && str1==str2)
i've seen second another's formula i suspect length comparison have finished boost formula productivity. used parser book libel specific dictionary: difference 4 24 letters enlarged normal 7-8 lettets, alphabet includes 26 latin letters and "@","$" "_".
length comparison used evade == user operative stl strings, apparently takes some-more following rudimentary integer comparison. nonetheless same initial minute chain given collection simply wider chain difference size, twin initial letters comparing strings generally some-more mostly different, sizes strings. creates length comparison unnecessary.
i've ran tests i've found out: while contrast twin futile strings comparison million times, second proceed many faster, length comparison seems helpful. nonetheless operative digest works even slower debug mode insufficiantly faster redeem mode.
so, doubt is: since length comparison bind comparison since delayed down?
upd: i don't second proceed either, nonetheless finished reason, i suppose, i wonder, reason.
upd2: seriously, doubt best. i'm even controlling stl strings box anymore. there's awe length comparison low wrong etc. awe - unequivocally tends work rather improved certain test. possible?
Comments
Post a Comment