emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: find-file-noselect needs save-match-data


From: martin rudalics
Subject: Re: find-file-noselect needs save-match-data
Date: Wed, 06 Jun 2007 14:49:38 +0200
User-agent: Mozilla Thunderbird 1.0 (Windows/20041206)

>>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.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]