From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Eli Zaretskii" To: dj@redhat.com Cc: gcc@gcc.gnu.org, gdb@sources.redhat.com, binutils@sources.redhat.com, cygwin@sources.redhat.com Subject: Re: Another RFC: regex in libiberty Date: Fri, 08 Jun 2001 00:11:00 -0000 Message-id: <9003-Fri08Jun2001100651+0300-eliz@is.elta.co.il> References: <200106080127.VAA01308@greed.delorie.com> X-SW-Source: 2001-06/msg00043.html > Date: Thu, 7 Jun 2001 21:27:31 -0400 > From: DJ Delorie > > I didn't get a clear feeling about what people wanted wrt this. I saw > three people propose three versions of regex, not much to go on. Is > this a big deal? Will it really get used by everyone who currently > has their own regex? Is it important to try to use a BSD-licensed > regex to minimize future problems? > > The two contenders seem to be a modified GNU regex and the > ever-popular Henry Spencer's regex. Does anyone have any strong > opinions for either of these, or against any regex in libiberty at > all? One notorious problem with GNU regex is that it is quite slow for many simple jobs, such as matching a simple regular expression with no backtracking. It seems that the main reason for this slowness is the fact that GNU regex supports null characters in strings. For examnple, Sed 3.02 compiled with GNU regex is about 2-4 times slower on simple jobs than the same Sed compiled with Spencer's regex library. (The DJGPP port of Sed is actually distributed with two executables, one build with GNU regex, the other with Spencer's, for this very reason.) So perhaps it might help to have more than just GNU regex in libiberty, for those applications that don't need to support null characters, and where regular expressions are used a lot, and so need to be fast.