Path: csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!aioe.org!news.stack.nl!newsfeed.xs4all.nl!newsfeed6.news.xs4all.nl!xs4all!post.news.xs4all.nl!not-for-mail Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.036 X-Spam-Evidence: '*H*': 0.93; '*S*': 0.00; 'python,': 0.01; 'capturing': 0.16; 'seconds,': 0.16; 'subject:expression': 0.16; 'subject:non': 0.16; 'this",': 0.16; 'meant': 0.17; 'perl': 0.18; 'seconds': 0.21; "doesn't": 0.22; "shouldn't": 0.23; '"this': 0.24; 'subject: ?': 0.24; 'says': 0.25; 'subject: : ': 0.25; 'guess': 0.26; 'matches': 0.29; 'x-mailer:microsoft outlook express 6.00.2900.5931': 0.30; "didn't": 0.31; 'does': 0.32; 'there': 0.33; 'to:addr:python-list': 0.34; 'subject:': 0.34; 'regular': 0.35; 'however,': 0.36; '"you': 0.37; 'but': 0.37; 'received:74.125': 0.37; 'received:google.com': 0.37; 'using': 0.38; 'non': 0.38; 'from:': 0.39; 'to:addr:python.org': 0.40; 'took': 0.63; 'subject:are': 0.65; 'received:188': 0.68; 'million': 0.76; 'difference.': 0.84; 'subject:groups': 0.84 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=message-id:from:to:references:subject:date:mime-version :content-type:content-transfer-encoding:x-priority:x-msmail-priority :x-mailer:x-mimeole; bh=x59hNR+L6da55MiJ16qQUlshYZIPASlNa7Za4zKlBO0=; b=iHD7Bu83wPvwZwRX0EhEgP/CgWjKmAf4fElUmZeb6roh56nMe0VlaIx0wR5qyZukES mQUiWFsDnOba1sQsxkO30Yot/+dxCwMj4F9mSqN+rWqAYqpnx0Pzzgep+V8vDZx6fMDb xuTqYe7ckebwqfdl5uqqBeLkLeyo777AV4v5E= From: "Octavian Rasnita" To: References: <4f02e31c$0$15724$426a74cc@news.free.fr><4f0315c6$0$10967$426a74cc@news.free.fr> Subject: Re: Regular expression : non capturing groups are faster ? Date: Tue, 3 Jan 2012 22:07:05 +0200 MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2900.5931 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.6157 X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Newsgroups: comp.lang.python Message-ID: Lines: 22 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1325621415 news.xs4all.nl 6847 [2001:888:2000:d::a6]:47994 X-Complaints-To: abuse@xs4all.nl Xref: x330-a1.tempe.blueboxinc.net comp.lang.python:18446 From: "Devin Jeanpierre" Subject: Re: Regular expression : non capturing groups are faster ? >> You meant Perl Documentation, didn't you ? >=20 > I guess that works too. I did mean Python, though -- its intent is to > say "you shouldn't worry about this", but in the process it says "this > does not exist" (a lie). ** However, the Perl documentation doesn't lie. I tested 10 million matches on my computer using capturing groups and it = took ~ 6 seconds, but only ~ 2 seconds with non-capturing params. So yes, it is very fast anyway, but ~ 3 times faster with non-capturing = params, so there is a difference. Octavian