From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 1469 invoked from network); 15 Oct 2004 09:28:47 -0000 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by ns1.primenet.com.au with SMTP; 15 Oct 2004 09:28:47 -0000 Received: (qmail 10421 invoked from network); 15 Oct 2004 09:28:42 -0000 Received: from sunsite.dk (130.225.247.90) by a.mx.sunsite.dk with SMTP; 15 Oct 2004 09:28:42 -0000 Received: (qmail 7995 invoked by alias); 15 Oct 2004 09:28:38 -0000 Mailing-List: contact zsh-workers-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 20490 Received: (qmail 7977 invoked from network); 15 Oct 2004 09:28:37 -0000 Received: from unknown (HELO a.mx.sunsite.dk) (130.225.247.88) by sunsite.dk with SMTP; 15 Oct 2004 09:28:37 -0000 Received: (qmail 9581 invoked from network); 15 Oct 2004 09:27:37 -0000 Received: from smtp1.freeserve.com (HELO mwinf3011.me.freeserve.com) (193.252.22.158) by a.mx.sunsite.dk with SMTP; 15 Oct 2004 09:27:35 -0000 Received: by mwinf3011.me.freeserve.com (SMTP Server, from userid 1003) id F2513180008E; Fri, 15 Oct 2004 11:27:34 +0200 (CEST) Received: from wwinf3006 (wwinf3006 [172.22.159.33]) by mwinf3011.me.freeserve.com (SMTP Server) with ESMTP id D40E3180008A for ; Fri, 15 Oct 2004 11:27:34 +0200 (CEST) Message-ID: <27982795.1097832454876.JavaMail.www@wwinf3006> From: pws@pwstephenson.fsnet.co.uk Reply-To: pws@pwstephenson.fsnet.co.uk To: zsh-workers Subject: Pattern change Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 7bit X-Originating-IP: [217.118.122.222] Date: Fri, 15 Oct 2004 11:27:34 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 2.63 on a.mx.sunsite.dk X-Spam-Level: X-Spam-Status: No, hits=0.2 required=6.0 tests=NO_REAL_NAME autolearn=no version=2.63 X-Spam-Hits: 0.2 I'm about to commit the change suggested by Bart that treats the test string for pattern matching by length instead of assuming null termination. It doesn't seem worth posting the patch since it changes large chunks of the file. There's a new test in D02glob.ztst for more complicated exclusion patterns involving paths, since these are specially handled. All tests still pass. Potentially this could mean we could unmetafy the string before attempting to match, which would have advantages. However, this only makes sense if the pattern itself uses unmetafied strings, and that's quite tricky. Pattern matching still uses memory allocation internally in two places. First, it uses it to copy in the start of the path for ~-exclusion. This can probably be moved further up by using appropriate flags. Second, it uses it to avoid pathological behaviour involving exclusions inside closures; without recording previous endpoints of matches this can become exponentially slow. It's possible this can be improved, too, however. pws -- Whatever you Wanadoo: http://www.wanadoo.co.uk/time/ This email has been checked for most known viruses - find out more at: http://www.wanadoo.co.uk/help/id/7098.htm