Re: [RFC] Replacing our regex implementation

2011-05-10 Thread Gabor Kovesdan
Em 09-05-2011 06:44, Tim Kientzle escreveu: Have you asked the TRE maintainers if they would accept this change? If they would, then getting this change into TRE would benefit a lot more people than just FreeBSD's libc. This is a longer term goal. First, I prefer having something to talk

Re: [RFC] Replacing our regex implementation

2011-05-10 Thread Gabor Kovesdan
Thanks to all for the valuable comments. I've decided to continue the work with TRE because - Many people don't like the idea of adding C++ code into libc - I'm not very skilled in C++ However, in a later phase of development, I think re2 may be a good source of ideas in optimizing the

Re: [RFC] Replacing our regex implementation

2011-05-09 Thread Tim Kientzle
On May 8, 2011, at 5:29 PM, Gabor Kovesdan wrote: 2, Optimizations for matching with a fixed pattern heuristic ... First, I was thinking of putting it into TRE but now I consider a better solution building a small library, libregexutils or such. It would decouple this optimization from the

Re: [RFC] Replacing our regex implementation

2011-05-09 Thread Bakul Shah
On Sun, 08 May 2011 21:35:04 CDT Zhihao Yuan lich...@gmail.com wrote: 1. This lib accepts many popular grammars (PCRE, POSIX, vim, etc.), but it does not allow you to change the mode. http://code.google.com/p/re2/source/browse/re2/re2.h The mode is decided when an RE2 object is instantiated

Re: [RFC] Replacing our regex implementation

2011-05-09 Thread David Schultz
On Sun, May 08, 2011, Bakul Shah wrote: On Sun, 08 May 2011 21:35:04 CDT Zhihao Yuan lich...@gmail.com wrote: 1. This lib accepts many popular grammars (PCRE, POSIX, vim, etc.), but it does not allow you to change the mode. http://code.google.com/p/re2/source/browse/re2/re2.h The mode

Re: [RFC] Replacing our regex implementation

2011-05-09 Thread Bakul Shah
On Mon, 09 May 2011 17:51:46 EDT David Schultz d...@freebsd.org wrote: On Sun, May 08, 2011, Bakul Shah wrote: On Sun, 08 May 2011 21:35:04 CDT Zhihao Yuan lich...@gmail.com wrote: 1. This lib accepts many popular grammars (PCRE, POSIX, vim, etc.), but it does not allow you to change

Re: [RFC] Replacing our regex implementation

2011-05-09 Thread Pedro F. Giffuni
--- On Sun, 5/8/11, Bakul Shah ba...@bitblocks.com wrote: ... C++ may be an impediment for it to go into libc but one can certainly put a C interface on a C++ library. I wouldn't think it's very consistent to use C++ in libc. Perhaps we could have the best of both worlds by using libtre

[RFC] Replacing our regex implementation

2011-05-08 Thread Gabor Kovesdan
Hi Folks, I've been given the opportunity to work in GSoC 2011 to replace our base regex library with a more modern one and given that the regex code is something essential probably there are lots of interested parties so I decided to open a thread here about my plans and the approach that I

Re: [RFC] Replacing our regex implementation

2011-05-08 Thread Pedro F. Giffuni
Hello; Thanks Gabor for this cool project! --- On Sun, 5/8/11, Gabor Kovesdan ga...@kovesdan.org wrote: ... - It doesn't provide the REG_STARTEND macro, which is our non-POSIX extension. Still, it is useful and easy to implement so it is not a problem either. Our sed requires REG_STARTEND

Re: [RFC] Replacing our regex implementation

2011-05-08 Thread Bakul Shah
As per the following URLs re2 is much faster than TRE (on the benchmarks they ran): http://lh3lh3.users.sourceforge.net/reb.shtml http://sljit.sourceforge.net/regex_perf.html re2 is in C++ has a PCRE API, while TRE is in C has a POSIX API. Both have BSD copyright. Is it worth considering

Re: [RFC] Replacing our regex implementation

2011-05-08 Thread Gabor Kovesdan
Em 09-05-2011 02:17, Bakul Shah escreveu: As per the following URLs re2 is much faster than TRE (on the benchmarks they ran): http://lh3lh3.users.sourceforge.net/reb.shtml http://sljit.sourceforge.net/regex_perf.html re2 is in C++ has a PCRE API, while TRE is in C has a POSIX API. Both have

Re: [RFC] Replacing our regex implementation

2011-05-08 Thread Bakul Shah
On Mon, 09 May 2011 02:37:10 BST Gabor Kovesdan ga...@kovesdan.org wrote: Em 09-05-2011 02:17, Bakul Shah escreveu: As per the following URLs re2 is much faster than TRE (on the benchmarks they ran): http://lh3lh3.users.sourceforge.net/reb.shtml

Re: [RFC] Replacing our regex implementation

2011-05-08 Thread Zhihao Yuan
On Sun, May 8, 2011 at 8:49 PM, Bakul Shah ba...@bitblocks.com wrote: On Mon, 09 May 2011 02:37:10 BST Gabor Kovesdan ga...@kovesdan.org  wrote: Em 09-05-2011 02:17, Bakul Shah escreveu: As per the following URLs re2 is much faster than TRE (on the benchmarks they ran):

Re: [RFC] Replacing our regex implementation

2011-05-08 Thread Lev Serebryakov
Hello, Bakul. You wrote 9 мая 2011 г., 5:17:09: As per the following URLs re2 is much faster than TRE (on the benchmarks they ran): http://lh3lh3.users.sourceforge.net/reb.shtml http://sljit.sourceforge.net/regex_perf.html re2 is much faster at price of memory. I don't remember details

Re: [RFC] Replacing our regex implementation

2011-05-08 Thread Bakul Shah
On Mon, 09 May 2011 08:30:57 +0400 Lev Serebryakov l...@freebsd.org wrote: Hello, Bakul. You wrote 9 =EC=E0=FF 2011 =E3., 5:17:09: As per the following URLs re2 is much faster than TRE (on the benchmarks they ran): http://lh3lh3.users.sourceforge.net/reb.shtml