From owner-freebsd-hackers Mon Oct 1 21:41:56 2001 Delivered-To: freebsd-hackers@freebsd.org Received: from squall.waterspout.com (squall.waterspout.com [208.13.56.12]) by hub.freebsd.org (Postfix) with ESMTP id 9285F37B40A for ; Mon, 1 Oct 2001 21:41:53 -0700 (PDT) Received: by squall.waterspout.com (Postfix, from userid 1050) id 051DE9B19; Mon, 1 Oct 2001 23:41:20 -0500 (EST) Date: Mon, 1 Oct 2001 23:41:19 -0500 From: Will Andrews To: "Andrew L. Neporada" Cc: freebsd-hackers@freebsd.org Subject: Re: current strstr(3) implementation is slow Message-ID: <20011001234119.D24038@squall.waterspout.com> Reply-To: Will Andrews References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.3.22.1i X-Operating-System: FreeBSD 4.3-STABLE i386 Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG On Tue, Oct 02, 2001 at 08:32:12AM +0400, Andrew L. Neporada wrote: > 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. Please send-pr them. -- wca To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message