[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: find-file-noselect needs save-match-data
From: |
Richard Stallman |
Subject: |
Re: find-file-noselect needs save-match-data |
Date: |
Wed, 06 Jun 2007 18:10:01 -0400 |
> 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).
That is true, but still it might be good to add a variant of
string-match that doesn't alter the match-data.
This function won't be faster than string-match, but it could be a lot
faster than (save-match-data (string-match...)), which is the way
to do this now.
Perhaps the name should be `safe-string-match'.
- Re: find-file-noselect needs save-match-data, (continued)
- Re: find-file-noselect needs save-match-data, Stefan Monnier, 2007/06/06
- Re: find-file-noselect needs save-match-data, Richard Stallman, 2007/06/06
- Re: find-file-noselect needs save-match-data, martin rudalics, 2007/06/06
- Re: find-file-noselect needs save-match-data, Stefan Monnier, 2007/06/06
- Re: find-file-noselect needs save-match-data, Lennart Borgman (gmail), 2007/06/06
- Re: find-file-noselect needs save-match-data, martin rudalics, 2007/06/06
- Re: find-file-noselect needs save-match-data,
Richard Stallman <=
- Re: find-file-noselect needs save-match-data, Stefan Monnier, 2007/06/06
- Re: find-file-noselect needs save-match-data, Richard Stallman, 2007/06/08
- Re: find-file-noselect needs save-match-data, Kim F. Storm, 2007/06/08
- Re: find-file-noselect needs save-match-data, martin rudalics, 2007/06/08
- Re: find-file-noselect needs save-match-data, Kim F. Storm, 2007/06/08
- Re: find-file-noselect needs save-match-data, Richard Stallman, 2007/06/09
- Re: find-file-noselect needs save-match-data, Herbert Euler, 2007/06/09
- Re: find-file-noselect needs save-match-data, Herbert Euler, 2007/06/09
- Re: find-file-noselect needs save-match-data, Richard Stallman, 2007/06/09
- Re: find-file-noselect needs save-match-data, Juri Linkov, 2007/06/09