From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 23601 invoked from network); 25 Apr 2000 11:25:40 -0000 Received: from sunsite.auc.dk (130.225.51.30) by ns1.primenet.com.au with SMTP; 25 Apr 2000 11:25:40 -0000 Received: (qmail 12500 invoked by alias); 25 Apr 2000 11:25:29 -0000 Mailing-List: contact zsh-workers-help@sunsite.auc.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 10913 Received: (qmail 12487 invoked from network); 25 Apr 2000 11:25:29 -0000 Date: Tue, 25 Apr 2000 13:25:15 +0200 (MET DST) Message-Id: <200004251125.NAA04170@beta.informatik.hu-berlin.de> From: Sven Wischnowsky To: zsh-workers@sunsite.auc.dk In-reply-to: Felix Rosencrantz's message of Tue, 25 Apr 2000 00:52:12 -0700 (PDT) Subject: Re: Compadd churning on matching specs Felix Rosencrantz wrote: > ... > > With all the matching specifications that I provided and the ones > _path_files provided, this causes match_str to chew for a while. This > seems wasteful, since we already know that the first part of the path is > fully specified. Would it be possible to just do matching on the last > part of the path, where "function" should be added? No. At least, not really. The `problem' is that match_str() does more than just check if the match matches the stuff on the line. It also builds the mystical cline lists which contain the information we need when building the unambiguous string. I always wanted to see if and how I could make matching faster... maybe now that enough people have started using match specs it is the time to try. I'll need some time for this, though, I'm hoping to be able to replace some of the matching attempts with strcmp() and splitting the string into parts. Dunno how well this will work, though. When using match specs, it is often a good idea to give an empty string as the first value to the matcher-list style. As Peter said, it reduces the number of surprising match results, but it also makes the first attempt faster for most of the common cases. Bye Sven -- Sven Wischnowsky wischnow@informatik.hu-berlin.de