Re: optimizing NOP emissions (Re: [Nautilus-list] nautilus & signals)

On Fri, 12 Apr 2002, Alex Larsson wrote:

> * byte_re_search_2 is our stupid gnome-vfs mime suffix sniffer that does a 
>   regexp match per possible suffix instead of combining the suffixes into 
>   one regexp.

I don't know what byte_re_search_2 do in nautilus (I don't even have the
code checked out), but in GNU regex (not POSIX) there is a re_match_2 that
only matches the re against the string in the first position, while
re_search_2 tries to match at any starting point. If you have re's like
".*\.mp3" (again I have not checked the code) then you probably will get
a massive speedup by using re_match_2 since for a failing match you fail 
directly and will not try to match again starting at position 1, 2, 3 and 
so on as re_search do.

It is something worth checking out at least.


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