The MASM Forum Archive 2004 to 2012

General Forums => The Laboratory => Topic started by: TNick on January 26, 2007, 10:56:51 AM

Title: InString challanger
Post by: TNick on January 26, 2007, 10:56:51 AM
Attached is a function to find a string within the other. The test program shows that it is considerably faster than InString (or t least on my home computer does). Further tests and improvements will be highly appreciated.

Regards,
Nick

PS thanks to Stan and Ultrano for the help concearning the objects, but, as you will see, I couldn't make a working exe on this computer (mostly because of my little knowledge in C). Anyway, on my home computer I have Visual Studio 6, and it works fine.

[attachment deleted by admin]
Title: Re: InString challanger
Post by: ecube on January 26, 2007, 01:16:54 PM
you could test it againts these http://www.masm32.com/board/index.php?topic=6181.0,  on the second page I believe lingo posts an even faster instring alg then his previous which was dominating the rest, so you compare it againts that one.
Title: Re: InString challanger
Post by: UlliN on January 26, 2007, 04:00:53 PM
I've included the FindStringA algo  in lingos testproc and got this (AMD64 FX57) :

----------------------
105 average msvcrt strstr
90 average finstr
46 average InStringL
130 average FindStringA
193 average InString
----------------------

Ulli
Title: Re: InString challanger
Post by: TNick on January 29, 2007, 11:57:09 AM
Yep, they beat the hell out of me... :) A proper search before posting this topic would help my ego a lot :) :) :)

Nick