Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 2 Oct 2001 08:32:12 +0400 (MSD)
From:      "Andrew L. Neporada" <andrew@nas.dgap.mipt.ru>
To:        freebsd-hackers@freebsd.org
Subject:   current strstr(3) implementation is slow
Message-ID:  <Pine.BSF.4.21.0110020807550.33266-100000@nas.dgap.mipt.ru>

next in thread | raw e-mail | index | archive | help
If the length of substring is M and the length of string is N, then
current algorithm takes O(N*M) operations.
It is possible to perform search faster -- O(N+M) operations only.

I'll send patches if you are interested.

				Andrey.


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-hackers" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.BSF.4.21.0110020807550.33266-100000>