Subject: Re: bin/36092: algorithmic inefficiency in bin/test/test.c:t_lex
To: None <gnats-admin@netbsd.org, netbsd-bugs@netbsd.org,>
From: Alan Barrett <apb@cequrux.com>
List: netbsd-bugs
Date: 03/27/2007 09:00:10
The following reply was made to PR bin/36092; it has been noted by GNATS.

From: Alan Barrett <apb@cequrux.com>
To: gnats-bugs@NetBSD.org
Cc: netbsd-bugs@NetBSD.org
Subject: Re: bin/36092: algorithmic inefficiency in bin/test/test.c:t_lex
Date: Tue, 27 Mar 2007 10:56:05 +0200

 On Tue, 27 Mar 2007, mtbakerguy@yahoo.com wrote:
 >    o the test builtin is *extremely* expensive with massive calls to
 >    strcmp in the t_lex function.  Specifically, it does linear walks
 >    of the operations to do a match.
 
 I wonder if just changing this to use a binary search would provide a
 significant gain.
 
 --apb (Alan Barrett)