From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: martin rudalics Newsgroups: gmane.emacs.devel Subject: Re: find-file-noselect needs save-match-data Date: Wed, 06 Jun 2007 14:49:38 +0200 Message-ID: <4666AD62.1060406@gmx.at> References: <46643852.6070709@gmx.at> <46665AD7.7040706@gmx.at> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-15; format=flowed Content-Transfer-Encoding: 7bit X-Trace: sea.gmane.org 1181134197 16889 80.91.229.12 (6 Jun 2007 12:49:57 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Wed, 6 Jun 2007 12:49:57 +0000 (UTC) Cc: Herbert Euler , emacs-devel@gnu.org To: Stefan Monnier Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Jun 06 14:49:56 2007 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1HvuxX-0005g3-6V for ged-emacs-devel@m.gmane.org; Wed, 06 Jun 2007 14:49:55 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1HvuxW-0001gB-Sl for ged-emacs-devel@m.gmane.org; Wed, 06 Jun 2007 08:49:54 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1HvuxS-0001fl-UU for emacs-devel@gnu.org; Wed, 06 Jun 2007 08:49:51 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1HvuxQ-0001fZ-Ia for emacs-devel@gnu.org; Wed, 06 Jun 2007 08:49:49 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1HvuxQ-0001fW-DG for emacs-devel@gnu.org; Wed, 06 Jun 2007 08:49:48 -0400 Original-Received: from mail.gmx.net ([213.165.64.20]) by monty-python.gnu.org with smtp (Exim 4.60) (envelope-from ) id 1HvuxP-0006l9-LH for emacs-devel@gnu.org; Wed, 06 Jun 2007 08:49:47 -0400 Original-Received: (qmail invoked by alias); 06 Jun 2007 12:49:46 -0000 Original-Received: from N824P031.adsl.highway.telekom.at (EHLO [62.47.46.255]) [62.47.46.255] by mail.gmx.net (mp004) with SMTP; 06 Jun 2007 14:49:46 +0200 X-Authenticated: #14592706 X-Provags-ID: V01U2FsdGVkX1+4eaVI0Zu4gfTUJSdyE9iW6L89aLlQz4F04PpWdI 8vIxnKny9VC70W User-Agent: Mozilla Thunderbird 1.0 (Windows/20041206) X-Accept-Language: de-DE, de, en-us, en In-Reply-To: X-Y-GMX-Trusted: 0 X-detected-kernel: Linux 2.6, seldom 2.4 (older, 4) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:72332 Archived-At: >>Both throw away match-data immediately. If match-data is expensive why >>build it in the first place when it's not needed? Why not make a thing >>like `fast-string-match' available in Lisp? > > > It's not the match data that's expensive. It's the save-match-data. > The match-data is built cheaply during the call to string-match in the form > of a C data structure. It's only when `match-data' is called that it ends > up building a Lisp lisp (sometimes with markers to boot). match-data is expensive because it consumes (1) brain resources when people have to think about saving it before they write another match operation, and (2) processing resources when they decide to save it.