From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/24566 Path: main.gmane.org!not-for-mail From: Felix Lee Newsgroups: gmane.emacs.gnus.general Subject: Re: Scoring is horribly slowed down by this entry. Why? Date: Sat, 31 Jul 1999 16:12:31 -0700 Sender: owner-ding@hpc.uh.edu Message-ID: <199907312312.TAA07594@sclp3.sclp.com> References: <87d7x8v3pn.fsf@cs.tu-berlin.de> NNTP-Posting-Host: coloc-standby.netfonds.no X-Trace: main.gmane.org 1035162110 9409 80.91.224.250 (21 Oct 2002 01:01:50 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Mon, 21 Oct 2002 01:01:50 +0000 (UTC) Cc: ding@gnus.org Return-Path: Original-Received: from farabi.math.uh.edu (farabi.math.uh.edu [129.7.128.57]) by sclp3.sclp.com (8.8.5/8.8.5) with ESMTP id TAA07611 for ; Sat, 31 Jul 1999 19:14:47 -0400 (EDT) Original-Received: from sina.hpc.uh.edu (lists@Sina.HPC.UH.EDU [129.7.3.5]) by farabi.math.uh.edu (8.9.3/8.9.3) with ESMTP id SAB26971; Sat, 31 Jul 1999 18:14:24 -0500 (CDT) Original-Received: by sina.hpc.uh.edu (TLB v0.09a (1.20 tibbs 1996/10/09 22:03:07)); Sat, 31 Jul 1999 18:15:18 -0500 (CDT) Original-Received: from sclp3.sclp.com (root@sclp3.sclp.com [204.252.123.139]) by sina.hpc.uh.edu (8.9.3/8.9.3) with ESMTP id SAA07977 for ; Sat, 31 Jul 1999 18:15:05 -0500 (CDT) Original-Received: from mail1.teleport.com (mail1.teleport.com [192.108.254.26]) by sclp3.sclp.com (8.8.5/8.8.5) with SMTP id TAA07594 for ; Sat, 31 Jul 1999 19:12:36 -0400 (EDT) Original-Received: (qmail 8924 invoked from network); 31 Jul 1999 23:12:34 -0000 Original-Received: from i48-20-13.pdx.du.teleport.com (HELO teleport.com) (flee@216.26.6.205) by mail1.teleport.com with SMTP; 31 Jul 1999 23:12:34 -0000 Original-To: Rui Zhu In-reply-to: <87d7x8v3pn.fsf@cs.tu-berlin.de> on 01 Aug 1999 00:45:08 +0200. Precedence: list X-Majordomo: 1.94.jlt7 Xref: main.gmane.org gmane.emacs.gnus.general:24566 X-Report-Spam: http://spam.gmane.org/gmane.emacs.gnus.general:24566 Rui Zhu : > ("\\([-_0-9A-Za-z]+\.\\)+\\(com\\|net\\) *$" -1000 nil r) 1. there are N possible starting points for the [...]+ pattern, and greedy-match semantics will have it doing N attempts for each possible starting point. the (...)+ pattern around it forces each of these N attempts to be done N times, so the best case performance is something like O(N**3). this is going to be terrible, because N is pretty large, since alphanumeric characters are common. 2. "\." should be "\\.". "\." == ".", which makes the regexp behavior worse, since it will need to try matching any character, not just alphanumerics, which makes N bigger, sort of. try using this instead: "[-_0-9A-Za-z.]+\.\\(com\\|net\\) *$" --